Exemple #1
0
        public Main()
        {
            InitializeComponent();

            prefix_cbo.SelectedIndexChanged += prefix_cbo_SelectedIndexChanged;

            this.FormClosing += Main_FormClosing;

            partnumber_grid.DoubleClick += partnumber_grid_DoubleClick;

            LoadWindowProperty();

            if (Properties.Settings.Default.FirstRun)
            {
                FirstTime frm = new FirstTime();

                frm.ShowDialog();
            }
        }
Exemple #2
0
        private void Main_Load(object sender, EventArgs e)
        {
            //Load datatable
            this.part_listingTableAdapter.Fill(this.eNGDataDataSet.part_listing);

            List<string> prefix = GetPrefixList();

            List<string> prefix_desc = GetPrefixDesc(prefix);

            for (int i = 0; i < prefix.Count; i++)
            {
                if (prefix_desc[i] != null)
                    prefix[i] += " - " + prefix_desc[i];
            }

            foreach (string val in prefix)
            {
                prefix_cbo.Items.Add(val);
            }

            prefix_cbo.SelectedIndex = prefix_cbo.FindString(Properties.Settings.Default.defaultFilter);

            if (Properties.Settings.Default.FirstRun)
            {
                FirstTime frm = new FirstTime();

                frm.ShowDialog();

                Properties.Settings.Default.FirstRun = false;

                Properties.Settings.Default.Save();
            }
        }