Esempio n. 1
0
 public static SelectedClass Instance()
 {
     if (instance == null)
     {
         instance = new SelectedClass();
     }
     return(instance);
 }
Esempio n. 2
0
        private void AppMainForm_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Minimized;

            this.Visible = true;
            this.LayoutMdi(System.Windows.Forms.MdiLayout.ArrangeIcons);

            Assembly asb = System.Reflection.Assembly.GetExecutingAssembly();

            AppName    = asb.GetName().ToString().Split(',')[0];
            AppVersion = asb.GetName().Version.ToString();
            string nm = asb.GetName().Name;

            object[] cp = asb.GetCustomAttributes(true);
            s = (AssemblyCompanyAttribute)cp[6];

            LanguageClass.Instance().InitEmbedded(this.GetType().Assembly, "HarpMeNow", "LanguageResource", "_", SelectedClass.Instance().Culture, LanguageClass.English);
            LanguageClass.Instance().ChangeLanguage(SelectedClass.Instance().Culture);
            SetLanguageControls();
            FormInstances.Create(this);
            FormInstances.Instance().LoadHarps();


            FormInstances.Instance().soundAttributeForm.Show();
            FormInstances.Instance().soundAttributeForm.SendToBack();
            FormInstances.Instance().harpSlotsForm.Show();
            FormInstances.Instance().harpSlotsForm.SendToBack();
            FormInstances.Instance().songSequenceForm.Show();
            FormInstances.Instance().songSequenceForm.SendToBack();
            FormInstances.Instance().harpSequenceForm.Show();
            FormInstances.Instance().harpSequenceForm.SendToBack();
            FormInstances.Instance().harpPlayForm.Show();
            FormInstances.Instance().harpPlayForm.SendToBack();

            FormInstances.Instance().harpPlayForm.Top = FormInstances.Instance().harpSlotsForm.Top;
            FormInstances.Instance().harpPlayForm.Left = FormInstances.Instance().harpSlotsForm.Left + FormInstances.Instance().harpSlotsForm.Width + 16;
            FormInstances.Instance().harpPlayForm.Height = FormInstances.Instance().harpSlotsForm.Height;
            FormInstances.Instance().songSequenceForm.Top = FormInstances.Instance().harpSlotsForm.Top + FormInstances.Instance().harpSlotsForm.Height + 16;
            FormInstances.Instance().songSequenceForm.Left = FormInstances.Instance().harpSlotsForm.Left;
            FormInstances.Instance().harpSequenceForm.Top = FormInstances.Instance().harpSlotsForm.Top + FormInstances.Instance().harpSlotsForm.Height + 16;
            FormInstances.Instance().harpSequenceForm.Left = FormInstances.Instance().songSequenceForm.Left + FormInstances.Instance().songSequenceForm.Width + 16;
            FormInstances.Instance().soundAttributeForm.Top = FormInstances.Instance().harpSequenceForm.Top;
            FormInstances.Instance().soundAttributeForm.Left = FormInstances.Instance().harpSequenceForm.Left + FormInstances.Instance().harpSequenceForm.Width + 16;

            this.WindowState = FormWindowState.Maximized;
            var cf = FBXInfo.Instance(this);

            cf.MdiParent = this;
            cf.Show();
            SetPositions();
        }