Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
12695783
Kaydet (Commit)
12695783
authored
Tem 04, 2013
tarafından
siqi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
retain servers in userdefaults
Change-Id: I2f6947423e3b5e1613de5658c691a3b6fca94d8b
üst
86f02abe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
UserInterfaceState.xcuserstate
...cuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
CommunicationManager.m
ios/iosremote/iosremote/Communication/CommunicationManager.m
+7
-6
MainStoryboard_iPhone.storyboard
...emote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
+1
-1
newServer_vc.m
ios/iosremote/iosremote/newServer_vc.m
+7
-0
No files found.
ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
Dosyayı görüntüle @
12695783
No preview for this file type
ios/iosremote/iosremote/Communication/CommunicationManager.m
Dosyayı görüntüle @
12695783
...
...
@@ -13,9 +13,10 @@
#import "SlideShow.h"
#import "CommandTransmitter.h"
#import "CommandInterpreter.h"
#import "libreoffice_sdremoteViewController.h"
#import <dispatch/dispatch.h>
#define ExistingServersKey @"CommunicationManager.ExistingServers"
@interface
CommunicationManager
()
@property
(
nonatomic
,
strong
)
Client
*
client
;
...
...
@@ -42,7 +43,7 @@
static
dispatch_once_t
_singletonPredicate
;
dispatch_once
(
&
_singletonPredicate
,
^
{
sharedComManager
=
[[
super
allocWithZone
:
nil
]
init
];
sharedComManager
=
[[
super
allocWithZone
:
nil
]
init
WithExistingServers
];
});
return
sharedComManager
;
...
...
@@ -56,7 +57,7 @@
NSLog
(
@"Connected"
);
self
.
transmitter
=
[[
CommandTransmitter
alloc
]
initWithClient
:
self
.
client
];
self
.
state
=
CONNECTED
;
[
self
.
delegate
setPinLabelText
:[
NSString
stringWithFormat
:
@"%@"
,
[
self
getPairingPin
]]];
//
[self.delegate setPinLabelText:[NSString stringWithFormat:@"%@", [self getPairingPin]]];
}
}
else
if
([[
note
name
]
isEqualToString
:
@"connection.status.disconnected"
]){
if
(
self
.
state
!=
DISCONNECTED
)
{
...
...
@@ -91,13 +92,12 @@
-
(
id
)
initWithExistingServers
{
self
=
[
self
init
];
NSUserDefaults
*
userDefaluts
=
[
NSUserDefaults
standardUserDefaults
];
if
(
!
userDefaluts
)
NSLog
(
@"userDefaults nil"
);
NSData
*
dataRepresentingExistingServers
=
[
userDefaluts
objectForKey
:
@"ExistingServers"
];
NSData
*
dataRepresentingExistingServers
=
[
userDefaluts
objectForKey
:
ExistingServersKey
];
if
(
dataRepresentingExistingServers
!=
nil
)
{
NSArray
*
oldSavedArray
=
[
NSKeyedUnarchiver
unarchiveObjectWithData
:
dataRepresentingExistingServers
];
...
...
@@ -144,7 +144,8 @@
{
Server
*
s
=
[[
Server
alloc
]
initWithProtocol
:
NETWORK
atAddress
:
addr
ofName
:
name
];
[
self
.
servers
addObject
:
s
];
NSLog
(
@"Having %lu servers now"
,
(
unsigned
long
)[
self
.
servers
count
]);
[[
NSUserDefaults
standardUserDefaults
]
setObject
:[
NSKeyedArchiver
archivedDataWithRootObject
:
self
.
servers
]
forKey
:
ExistingServersKey
];
[[
NSUserDefaults
standardUserDefaults
]
synchronize
];
}
@end
ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
Dosyayı görüntüle @
12695783
...
...
@@ -12,7 +12,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"64"
width=
"320"
height=
"504"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<prototypes>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"blue"
hidesAccessoryWhenEditing=
"NO"
indentationLevel=
"1"
indentationWidth=
"0.0"
reuseIdentifier=
"server_item_cell"
textLabel=
"Rg3-PU-OuS"
detailTextLabel=
"9Mc-gD-acc"
style=
"IBUITableViewCellStyleValue1"
id=
"Pvl-Uw-Ghs"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"blue"
hidesAccessoryWhenEditing=
"NO"
indentationLevel=
"1"
indentationWidth=
"0.0"
reuseIdentifier=
"server_item_cell"
editingAccessoryType=
"disclosureIndicator"
textLabel=
"Rg3-PU-OuS"
detailTextLabel=
"9Mc-gD-acc"
style=
"IBUITableViewCellStyleValue1"
id=
"Pvl-Uw-Ghs"
>
<rect
key=
"frame"
x=
"0.0"
y=
"22"
width=
"320"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<view
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
>
...
...
ios/iosremote/iosremote/newServer_vc.m
Dosyayı görüntüle @
12695783
...
...
@@ -22,6 +22,9 @@
-
(
IBAction
)
save
:(
id
)
sender
{
NSString
*
serverName
=
[
self
.
nameCell
.
textField
text
];
NSString
*
serverAddr
=
[
self
.
addrCell
.
textField
text
];
if
(
!
serverName
)
{
serverName
=
@"Computer"
;
}
NSLog
(
@"New server name:%@ ip:%@"
,
serverName
,
serverAddr
);
[
self
.
comManager
addServersWithName
:
serverName
AtAddress
:
serverAddr
];
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
...
...
@@ -241,6 +244,7 @@ titleForHeaderInSection:(NSInteger)section
NSInteger
tag
=
INT_MIN
;
NSString
*
text
=
nil
;
NSString
*
placeholder
=
nil
;
UIKeyboardType
keyboardType
;
// Pick the editable cell and the values for its textField
//
...
...
@@ -255,6 +259,7 @@ titleForHeaderInSection:(NSInteger)section
text
=
[
self
.
server
serverName
];
tag
=
ServerName
;
placeholder
=
@"Server Name (optional)"
;
keyboardType
=
UIKeyboardTypeDefault
;
}
else
{
...
...
@@ -262,6 +267,7 @@ titleForHeaderInSection:(NSInteger)section
text
=
[
self
.
server
serverAddress
];
tag
=
ServerAddr
;
placeholder
=
@"IP Address"
;
keyboardType
=
UIKeyboardTypeNumbersAndPunctuation
;
}
break
;
}
...
...
@@ -269,6 +275,7 @@ titleForHeaderInSection:(NSInteger)section
[
cell
.
textField
setPlaceholder
:
placeholder
];
[
cell
setTag
:
tag
];
[
cell
.
textField
setText
:
text
];
[
cell
.
textField
setKeyboardType
:
keyboardType
];
return
cell
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment