Пример #1
0
 public TextShow(string account, string password, string address, WindowHideMode hide)
 {
     this.account  = account;
     this.password = password;
     this.address  = address;
     this.hide     = new Hide(hide);
 }
Пример #2
0
 //打开设置界面
 private void Setting_Click(object sender, RoutedEventArgs e)
 {
     setting = new Setting();
     setting.ShowDialog();
     ifHiden    = serverData.getWindowHideMode();
     photosPath = serverData.getshotfilepath();
     updatePhotoes();
 }
Пример #3
0
 //所有数据初始化
 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);
     }
 }
Пример #4
0
        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);
        }
Пример #5
0
        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;
            }
        }
Пример #6
0
 public Hide(WindowHideMode hide)
 {
     this.hide = hide;
 }
Пример #7
0
 public GeneralData(string path, WindowHideMode hide)
 {
     this.path = path;
     this.hide = new Hide(hide);
 }
Пример #8
0
 public void setHide(bool isHide)
 {
     hide = isHide? WindowHideMode.Hide:WindowHideMode.NotHide;
 }