public TextShow(string account, string password, string address, WindowHideMode hide) { this.account = account; this.password = password; this.address = address; this.hide = new Hide(hide); }
//打开设置界面 private void Setting_Click(object sender, RoutedEventArgs e) { setting = new Setting(); setting.ShowDialog(); ifHiden = serverData.getWindowHideMode(); photosPath = serverData.getshotfilepath(); updatePhotoes(); }
//所有数据初始化 private void dataInit() { try { isConnected = false; serverData = new ConfigManager(); photosPath = serverData.getshotfilepath(); accountBox.Text = serverData.getServerAccount(); passwordBox.Password = serverData.getServerPassword(); addressBox.Text = serverData.getServerAddress(); counter = serverData.getFileCounter(); ifHiden = serverData.getWindowHideMode(); cloudConnection = new Cloud(); } catch (Exception ex) { MessageBox.Show("发生错误!错误原因:" + ex.Message); } }
public void setWindowHideMode(WindowHideMode newWindowHideMode) { this.windowHideMode = newWindowHideMode; System.Xml.XmlNode node = this.configXmlFile.SelectSingleNode(windowhidemodelabel); if (node == null) { throw new System.Exception("the Configure file is illegal!"); } System.Xml.XmlElement element = (System.Xml.XmlElement)node; if (newWindowHideMode == easyShot.WindowHideMode.Hide) { element.SetAttribute("content", easyShot.WindowHideMode.Hide.ToString()); } else if (newWindowHideMode == easyShot.WindowHideMode.NotHide) { element.SetAttribute("content", easyShot.WindowHideMode.NotHide.ToString()); } else { element.SetAttribute("content", easyShot.WindowHideMode.NotHide.ToString()); } configXmlFile.Save(configXmlFilePath); }
public void loadWindowHideMode() { this.configXmlFile.Load(this.configXmlFilePath); System.Xml.XmlNode node = this.configXmlFile.SelectSingleNode(windowhidemodelabel); if (node == null) { throw new System.Exception("the Configure file is illegal!"); } System.Xml.XmlElement element = (System.Xml.XmlElement)node; string temp = element.GetAttribute("content").ToString(); if (temp == easyShot.WindowHideMode.NotHide.ToString()) { this.windowHideMode = easyShot.WindowHideMode.NotHide; } else if (temp == easyShot.WindowHideMode.Hide.ToString()) { this.windowHideMode = easyShot.WindowHideMode.Hide; } else { this.windowHideMode = easyShot.WindowHideMode.Hide; } }
public Hide(WindowHideMode hide) { this.hide = hide; }
public GeneralData(string path, WindowHideMode hide) { this.path = path; this.hide = new Hide(hide); }
public void setHide(bool isHide) { hide = isHide? WindowHideMode.Hide:WindowHideMode.NotHide; }