Ejemplo n.º 1
0
        private void MenuUserbarLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Filter = "Userbar Struktur (*.xml)|*.xml";
            if (dlg.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            XmlSerializer xml     = new XmlSerializer(typeof(Userbar));
            Userbar       tempBar = null;

            using (Stream s = File.OpenRead(dlg.FileName))
                try {
                    tempBar = xml.Deserialize(s) as Userbar;
                } catch (Exception ex) {
                    System.Diagnostics.Debug.WriteLine(ex);
                }

            if (tempBar == null)
            {
                MessageBox.Show("Fehler beim öffnen der Datei!\nFalls dies öfter passiert, wende dich bitte an GodLesZ.", "Fehler beim laden", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            mUserbar = tempBar;
            mUserbar.ReInitialize(mAssembly, userbarImage, comboCustomFont);
            InitializeCombos(true, false);
            InitializeForm();
            InitializeCombos(false, true);
            mUserbar.Initialized = true;
            mUserbar.Update();
        }
Ejemplo n.º 2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            mAssembly = System.Reflection.Assembly.GetExecutingAssembly();

            Text += string.Format(" v{0} - by GodLesZ", mAssembly.ShortVersion());

            mUserbar             = new Userbar(mAssembly, userbarImage, comboCustomFont);
            mInputTimer          = new Timer();
            mInputTimer.Interval = 350;
            mInputTimer.Tick    += new EventHandler(mInputTimer_Tick);
            mInputTimer.Enabled  = true;
            mInputTimer.Stop();

            InitializeCombos(true, true);

            InitializeUserbar();
            mUserbar.Update();
        }
Ejemplo n.º 3
0
		private void MenuUserbarLoad_Click( object sender, EventArgs e ) {
			OpenFileDialog dlg = new OpenFileDialog();
			dlg.Filter = "Userbar Struktur (*.xml)|*.xml";
			if( dlg.ShowDialog() != DialogResult.OK )
				return;

			XmlSerializer xml = new XmlSerializer( typeof( Userbar ) );
			Userbar tempBar = null;
			using( Stream s = File.OpenRead( dlg.FileName ) )
				try {
					tempBar = xml.Deserialize( s ) as Userbar;
				} catch( Exception ex ) {
					System.Diagnostics.Debug.WriteLine( ex );
				}

			if( tempBar == null ) {
				MessageBox.Show( "Fehler beim öffnen der Datei!\nFalls dies öfter passiert, wende dich bitte an GodLesZ.", "Fehler beim laden", MessageBoxButtons.OK, MessageBoxIcon.Error );
				return;
			}

			mUserbar = tempBar;
			mUserbar.ReInitialize( mAssembly, userbarImage, comboCustomFont );
			InitializeCombos( true, false );
			InitializeForm();
			InitializeCombos( false, true );
			mUserbar.Initialized = true;
			mUserbar.Update();
		}
Ejemplo n.º 4
0
		private void frmMain_Load( object sender, EventArgs e ) {
			mAssembly = System.Reflection.Assembly.GetExecutingAssembly();

			Text += string.Format( " v{0} - by GodLesZ", mAssembly.ShortVersion() );

			mUserbar = new Userbar( mAssembly, userbarImage, comboCustomFont );
			mInputTimer = new Timer();
			mInputTimer.Interval = 350;
			mInputTimer.Tick += new EventHandler( mInputTimer_Tick );
			mInputTimer.Enabled = true;
			mInputTimer.Stop();

			InitializeCombos( true, true );

			InitializeUserbar();
			mUserbar.Update();
		}