~tjost/do-plugins/mythremote

« back to all changes in this revision

Viewing changes to MythRemote/src/MythRemoteEditFrontendDialog.cs

  • Committer: Tobias Jost
  • Date: 2010-08-30 01:47:42 UTC
  • Revision ID: jost86@googlemail.com-20100830014742-qrudrql6rkd0a9so
Editing Frontends works

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
        public class MythRemoteEditFrontendDialog : MythRemoteAbstractFrontendDialog
9
9
        {
10
10
 
11
 
                public MythRemoteEditFrontendDialog (MythRemotePreferences prefWindow)
12
 
                {
13
 
                        this.Title = "Edit Frontend";
 
11
                private string oldIP;
 
12
                private string oldName;
 
13
                private string oldMAC;
 
14
                
 
15
                public MythRemoteEditFrontendDialog ()
 
16
                {
 
17
                        
 
18
                }
 
19
                
 
20
                public MythRemoteEditFrontendDialog(string ip, string name, string mac)
 
21
                {
 
22
                        this.oldIP = ip;
 
23
                        this.oldName = name;
 
24
                        this.oldMAC = mac;
 
25
                        textIP.Text = ip;
 
26
                        textName.Text = name;
 
27
                        textMAC.Text = mac;                     
 
28
                        
 
29
                        this.Title = "Edit Frontend";                   
 
30
                }
 
31
                
 
32
                protected override void OnButtonOkClicked (object sender, System.EventArgs e)
 
33
                {
 
34
                        string frontends = prefs.Get<String>("frontends","");
 
35
                        frontends = frontends.Replace(oldIP+","+oldName+","+oldMAC, textIP.Text+","+textName.Text+","+textMAC.Text);
 
36
                        prefs.Set<string>("frontends", frontends);
 
37
                        Destroy();
14
38
                }
15
39
        }
16
40
}