示例#1
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            xmlHandler handler = new xmlHandler();

            handler.WriteList();
            SerializationHandler shandler = new SerializationHandler();

            shandler.Serialize();
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();
            SerializationHandler shandler = new SerializationHandler();

            shandler.Deserialize();
            foreach (var x in ProfileLog.profileList)
            {
                richTextBox2.Text += x.Email;
            }

            xmlHandler handler = new xmlHandler();

            try
            { comboBoxColors.Items.Clear();
              handler.ReadList();
              foreach (var x in ThemesCollection.themesList)
              {
                  comboBoxColors.Items.Add(x.ThemeName);
              }
              comboBoxColors.Update(); }
            catch (Exception)
            {
                ThemesCollection.InitializeList();
                LabelErrorMessage.Text = "File Not Found";
            }

            LabelErrorMessage.Text          = "";
            buttonSetColor.Enabled          = false;
            radioButtonThemes.Checked       = true;
            radioButtonSpecificDate.Checked = true;
            progressBar1.Visible            = false;
            comboBoxColors.SelectedItem     = "default";
            SetThemes("Default");
            // comboBoxColors.DataSource = ThemesCollection.themesList;
            ThemesCollection.themesList.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(themesList_CollectionChanged);
        }
示例#3
0
        public Form1()
        {
            InitializeComponent();



            /*                Commenting out This Dangerous Code
             *
             *  Form1.CheckForIllegalCrossThreadCalls = false;
             */

            textBoxFolderAdress.Text = "D:\\";
            RelativePath             = textBoxFolderAdress.Text;
            w = new DynamoWebClient(RelativePath);
            w.InformationDownloadEvent += new InformationDownloadHandler(w_InformationDownloadEvent);
            button2.Enabled             = false;
            button3.Enabled             = false;
            SerializationHandler shandler = new SerializationHandler();

            shandler.Deserialize();
            shandler.DeserializeJobs();
            shandler.DeserializeApplicants();
            ProfileLog profilelog = ProfileLog.Create;

            foreach (var x in profilelog.ProfileList)
            {
                if (String.IsNullOrEmpty(x.Email) == false)
                {
                    comboBoxEmails.Items.Add(x.Email);
                }
                if (x.IsActive == true)
                {
                    comboBoxEmails.Text = x.Email;
                }
            }
            xmlHandler handler = new xmlHandler();

            try
            {
                comboBoxColors.Items.Clear();
                handler.ReadList();
                foreach (var x in ThemesCollection.themesList)
                {
                    comboBoxColors.Items.Add(x.ThemeName);
                }
                comboBoxColors.Update();
            }
            catch (Exception)
            {
                ThemesCollection.InitializeList();
                LabelErrorMessage.Text = "File Not Found";
            }

            LabelErrorMessage.Text          = "";
            buttonSetColor.Enabled          = false;
            radioButtonThemes.Checked       = true;
            radioButtonSpecificDate.Checked = true;
            progressBar1.Visible            = false;

            if (ThemesCollection.themesList.Count > 0)
            {
                ThemesCollection.InitializeList();
                // comboBoxColors.SelectedItem = "default";
                Themes x = ThemesCollection.GetActive();
                if (x != null && String.IsNullOrEmpty(x.ThemeName) == false)
                {
                    SetThemes(x.ThemeName);
                    comboBoxColors.SelectedText = x.ThemeName;
                    comboBoxColors.Text         = x.ThemeName;
                }
            }
            else
            {
                SetThemes("default");
            }
            radioButtonRecent.Checked = true; ThemesCollection.themesList.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(themesList_CollectionChanged);
        }