コード例 #1
0
        private void FullscreenHandler(bool fullscreen)
        {
            // Note: Since the video window is override-redirect, we
            // need to fullscreen the main window, so the window manager
            // actually knows we are actually doing stuff in fullscreen
            // here. The original primary window fullscreen state is
            // stored, so when we can restore it appropriately

            is_fullscreen = fullscreen;

            if (fullscreen)
            {
                primary_window.Fullscreen();

                MoveVideoExternal(true);
                video_window.Show();
                fullscreen_adapter.Fullscreen(video_window, true);
                screensaver.Inhibit();
            }
            else
            {
                video_window.Hide();
                screensaver.UnInhibit();
                fullscreen_adapter.Fullscreen(video_window, false);
                video_window.Hide();

                if (!primary_window_is_fullscreen)
                {
                    primary_window.Unfullscreen();
                }
            }
        }
コード例 #2
0
 public void Hide()
 {
     if (Visible)
     {
         window.Hide();
     }
 }
コード例 #3
0
    RepetitiveConditionsWindow()
    {
        Glade.XML gladeXML;
        gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "repetitive_conditions.glade", "repetitive_conditions", "chronojump");
        gladeXML.Autoconnect(this);

        //don't show until View is called
        repetitive_conditions.Hide();

        //put an icon to window
        UtilGtk.IconWindow(repetitive_conditions);

        FakeButtonClose = new Gtk.Button();

        //createComboEncoderAutomaticVariable();
        createComboEncoderMainVariable();

        bestSetValueCaptureMainVariable         = 0;
        bestSetValueCaptureMainVariable         = 0;
        notebook_encoder_conditions.CurrentPage = 3;         //power

        putNonStandardIcons();

        label_rhythm_tab.Text = Catalog.GetString("Rhythm") + " / " + Catalog.GetString("Protocol");
    }
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: daelsepara/CameraApp
    void InitializePatternWindow()
    {
        patternWindow.Resize(Pattern.Width, Pattern.Height);
        patternWindow.Decorated = false;

        var screens = Screen.NMonitors;

        if (screens > 1)
        {
            var geometry = Screen.GetMonitorGeometry(1);

            Pattern.Top    = geometry.Top;
            Pattern.Left   = geometry.Left;
            Pattern.Width  = geometry.Width;
            Pattern.Height = geometry.Height;

            patternWindow.Show();
        }
        else
        {
            patternWindow.Hide();
        }

        MovePatternWindow();

        patternWidth.Value  = Pattern.Width;
        patternHeight.Value = Pattern.Height;
        patternTop.Value    = Pattern.Top;
        patternLeft.Value   = Pattern.Left;
    }
コード例 #5
0
 public void Run()
 {
     loaderThread = new Thread(new ThreadStart(delegate()
     {
         logic.Init("./PeriodicTable.dat", new PeriodicTableLogic.HandleProgress(delegate(double progress, string status)
         {
             try
             {
                 Application.Invoke(delegate(object sender2, EventArgs e2) { totalProgress.Adjustment.Value = progress; progressStep.Text = status; });
             }
             catch (NullReferenceException)
             {
                 return;
             }
         }));
         try
         {
             Application.Invoke(delegate(object sender2, EventArgs e2) { loaderWindow.Hide(); });
         }
         catch (NullReferenceException)
         {
             return;
         }
     }));
     loaderThread.Start();
 }
コード例 #6
0
 public void on_search_button_close_activate(object o, EventArgs ea)
 {
     Console.WriteLine("Close");
     if (search_dialog != null)
     {
         search_dialog.Hide();
     }
 }
コード例 #7
0
ファイル: TestDnd.cs プロジェクト: plprevost/gtk-sharp-edit
    private static bool HandlePopdownCallback()
    {
        popdown_timer = 0;
        popup_window.Hide();
        popped_up = false;

        return(false);
    }
コード例 #8
0
 private void FullscreenHandler(bool fullscreen)
 {
     if (fullscreen)
     {
         MoveVideoExternal(true);
         video_window.Show();
         fullscreen_adapter.Fullscreen(video_window, true);
         screensaver.Inhibit();
     }
     else
     {
         video_window.Hide();
         screensaver.UnInhibit();
         fullscreen_adapter.Fullscreen(video_window, false);
         video_window.Hide();
     }
 }
コード例 #9
0
        public new void Show()
        {
            source_combo_box.UpdateActiveSource();
            UpdateMetaDisplay();

            default_main_window.Hide();
            InterfaceElements.MainWindow = this;

            base.Show();

            volume_button.Volume = PlayerEngineCore.Volume;
        }
コード例 #10
0
 internal void HideWidget()
 {
     if (floatingWindow != null)
     {
         floatingWindow.Hide();
     }
     else if (dockBarItem != null)
     {
         dockBarItem.Hide();
     }
     else if (widget != null)
     {
         widget.Hide();
     }
 }
コード例 #11
0
 private void FullscreenHandler(bool fullscreen)
 {
     if (!handlingFullScreen)
     {
         handlingFullScreen             = true;
         FilterView.FSButton.IsActive   = fullscreen;
         FilterView.LabelTrackIsVisible = ClutterFlowSchemas.DisplayTitle.Get() && fullscreen;
         if (fullscreen)
         {
             MoveVideoExternal(true);
             video_window.Show();
             fullscreen_adapter.Fullscreen(video_window, true);
             screensaver.Inhibit();
         }
         else
         {
             video_window.Hide();
             screensaver.UnInhibit();
             fullscreen_adapter.Fullscreen(video_window, false);
             video_window.Hide();
         }
         handlingFullScreen = false;
     }
 }
コード例 #12
0
            public override void EndDrag(double x, double y)
            {
                timer.Stop();

                Rectangle box    = Bounds();
                double    middle = box.X + (box.Width / 2.0);

                int position;

                DragOffset = 0;

                selector.BoxXHitFilled(middle, out position);
                this.SetPosition(position);
                State    = StateType.Prelight;
                Dragging = false;
                popup_window.Hide();
            }
コード例 #13
0
ファイル: PoofWindow.cs プロジェクト: crystaldust/Docky
        public void Run()
        {
            var poof_file = DockServices.Paths.SystemDataFolder.GetChild("poof.png");

            if (!poof_file.Exists)
            {
                return;
            }

            poof = new Pixbuf(poof_file.Path);

            window = new Gtk.Window(Gtk.WindowType.Toplevel);
            window.AppPaintable = true;
            window.Resizable    = false;
            window.KeepAbove    = true;
            window.CanFocus     = false;
            window.TypeHint     = WindowTypeHint.Splashscreen;
            window.SetCompositeColormap();

            window.Realized += delegate { window.GdkWindow.SetBackPixmap(null, false); };

            window.SetSizeRequest(size, size);
            window.ExposeEvent += HandleExposeEvent;

            GLib.Timeout.Add(30, delegate {
                if (AnimationState == 1)
                {
                    window.Hide();
                    window.Destroy();
                    poof.Dispose();
                    return(false);
                }
                else
                {
                    window.QueueDraw();
                    return(true);
                }
            });

            window.Move(x, y);
            window.ShowAll();
            run_time = DateTime.UtcNow;
        }
コード例 #14
0
    RepetitiveConditionsWindow()
    {
        Glade.XML gladeXML;
        gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "repetitive_conditions.glade", "repetitive_conditions", "chronojump");
        gladeXML.Autoconnect(this);

        //don't show until View is called
        repetitive_conditions.Hide();

        //put an icon to window
        UtilGtk.IconWindow(repetitive_conditions);

        FakeButtonClose = new Gtk.Button();

        createComboEncoderAutomaticVariable();

        bestSetValue = 0;

        putNonStandardIcons();
    }
コード例 #15
0
		public void Run ()
		{
			var poof_file = DockServices.Paths.SystemDataFolder.GetChild ("poof.png");
			if (!poof_file.Exists)
				return;
			
			poof = new Pixbuf (poof_file.Path);
			
			window = new Gtk.Window (Gtk.WindowType.Toplevel);
			window.AppPaintable = true;
			window.Resizable = false;
			window.KeepAbove = true;
			window.CanFocus = false;
			window.TypeHint = WindowTypeHint.Splashscreen;
			window.SetCompositeColormap ();
			
			window.Realized += delegate { window.GdkWindow.SetBackPixmap (null, false); };
			
			window.SetSizeRequest (size, size);
			window.ExposeEvent += HandleExposeEvent;
			
			GLib.Timeout.Add (30, delegate {
				if (AnimationState == 1) {
					window.Hide ();
					window.Destroy ();
					poof.Dispose ();
					return false;
				} else {
					window.QueueDraw ();
					return true;
				}
			});
			
			window.Move (x, y);
			window.ShowAll ();
			run_time = DateTime.UtcNow; 
		}
コード例 #16
0
 private void on_button_close_clicked(object o, EventArgs args)
 {
     chronopic_register_win.Hide();
     chronopic_register_win = null;
 }
コード例 #17
0
 private void ShowClientUpgradeMessageBox()
 {
     if(this.NewClientVersion == null || this.ClientUpgradeStatus == null || this.NewClientDomainID == null)
        {
     return;
        }
        if (ClientUpgradeDialog != null)
     return;
        if(DomainController.upgradeStatus.statusCode == StatusCodes.ServerOld)
        {
     ClientUpgradeDialog = new iFolderMsgDialog(
     null,
     iFolderMsgDialog.DialogType.Info,
     iFolderMsgDialog.ButtonSet.Ok,
     Util.GS("iFolder Server Older"),
     Util.GS("The server is running an older version."),
     string.Format(Util.GS("The server needs to be upgraded to be connected from this client")));
        }
        else if(DomainController.upgradeStatus.statusCode == StatusCodes.UpgradeNeeded)
        {
     ClientUpgradeDialog = new iFolderMsgDialog(
     null,
     iFolderMsgDialog.DialogType.Info,
     iFolderMsgDialog.ButtonSet.AcceptDeny,
     Util.GS("iFolder Client Upgrade"),
     Util.GS("Would you like to download new iFolder Client?"),
     string.Format(Util.GS("The client needs to be upgraded to be connected to the server")));
        }
        else
        {
     ClientUpgradeDialog = new iFolderMsgDialog(
     null,
     iFolderMsgDialog.DialogType.Info,
     iFolderMsgDialog.ButtonSet.AcceptDeny,
     Util.GS("iFolder Client Upgrade"),
     Util.GS("Would you like to download new iFolder Client?"),
     string.Format(Util.GS("A newer version \"{0}\" of the iFolder Client is available."), this.NewClientVersion));
        }
        int rc = ClientUpgradeDialog.Run();
        ClientUpgradeDialog.Hide();
        ClientUpgradeDialog.Destroy();
        ClientUpgradeDialog = null;
        if (rc == -8)
        {
     bool bUpdateRunning = false;
     Gtk.Window win = new Gtk.Window("");
     string initialPath = (string)System.IO.Path.GetTempPath();
     Debug.PrintLine(String.Format("Initial Path: {0}", initialPath));
     CopyLocation cp = new CopyLocation(win, (string)System.IO.Path.GetTempPath());
     string selectedFolder = "";
                  int rc1 = 0;
                  do
                  {
                          rc1 = cp.Run();
                          cp.Hide();
                          if(rc1 ==(int)ResponseType.Ok)
                          {
                                  selectedFolder = cp.iFolderPath.Trim();
                           cp.Destroy();
                                  cp = null;
                                  break;
                          }
                   }while( rc1 == (int)ResponseType.Ok);
     if( cp != null)
     {
      cp.Destroy();
      cp=null;
     }
     win.Hide();
     win.Destroy();
     win=null;
     if( rc1 != (int) ResponseType.Ok)
     {
      Debug.PrintLine("OnClientUpgradeAvailableEvent return");
      ClientUpgradeDialog = null;
      return;
     }
     try
     {
      if(ifws !=null)
      {
       Debug.PrintLine("ifws.RunClientUpdate");
       bUpdateRunning = ifws.RunClientUpdate(this.NewClientDomainID, selectedFolder);
      }
     }
     catch(Exception e)
     {
      Debug.PrintLine(String.Format("ifws.RunClientUpdate exception :{0}", e.Message));
      ClientUpgradeDialog = null;
      return;
     }
     if (bUpdateRunning)
     {
     ClientUpgradeDialog = new iFolderMsgDialog(
     null,
     iFolderMsgDialog.DialogType.Info,
     iFolderMsgDialog.ButtonSet.Ok,
     Util.GS("Download Complete..."),
     Util.GS("Download Finished "),
     string.Format(Util.GS("The new client rpm's have been downloaded.")));
     ClientUpgradeDialog.Run();
     ClientUpgradeDialog.Hide();
     ClientUpgradeDialog.Destroy();
     }
     else
     {
      iFolderMsgDialog dialog = new iFolderMsgDialog(
       null,
       iFolderMsgDialog.DialogType.Error,
       iFolderMsgDialog.ButtonSet.None,
       Util.GS("Upgrade Failure"),
       Util.GS("The iFolder client upgrade failed."),
       Util.GS("Please contact your system administrator."));
      dialog.Run();
      dialog.Hide();
      dialog.Destroy();
      dialog = null;
     }
     if( DomainController.upgradeStatus.statusCode == StatusCodes.UpgradeNeeded )
     {
      if( domainController.GetDomain(this.NewClientDomainID) != null)
       domainController.RemoveDomain(this.NewClientDomainID, false);
     }
        }
        else
        {
     if(DomainController.upgradeStatus.statusCode == StatusCodes.ServerOld || DomainController.upgradeStatus.statusCode == StatusCodes.UpgradeNeeded )
     {
      if( domainController.GetDomain(this.NewClientDomainID) != null)
       domainController.RemoveDomain(this.NewClientDomainID, false);
     }
        }
        ClientUpgradeDialog = null;
        this.ClientUpgradeStatus = null;
        this.NewClientVersion = null;
        this.NewClientDomainID = null;
 }
コード例 #18
0
        // When finished gfax.Destinations will contain a list of contacts
        // of Phonebook.Contact type.
        private void on_SendfaxButton_clicked(object o, EventArgs args)
        {
            Gtk.TreeIter iter = new Gtk.TreeIter();
            ArrayList    rows = new ArrayList();

            if (includeFilename == "do_filename")
            {
                filename = FilenameEntry.Text;
            }

            if (!File.Exists(filename))
            {
                MessageDialog md;
                md = new MessageDialog(null, DialogFlags.DestroyWithParent,
                                       MessageType.Info, ButtonsType.Ok,
                                       Catalog.GetString(
                                           @"
The file you have entered does not exist.
Please check the name and try again.")
                                       );
                md.Run();
                md.Destroy();
                return;
            }

            // clear all the distinations, it's a little wierd yup
            gfax.Destinations.Clear();

            // Get the first row.
            ItemStore.GetIterFirst(out iter);

            try {
                if ((bool)ItemStore.GetValue(iter, 0))                                  // if send is true (toggle set)

                {
                    GfaxContact c = new GfaxContact();
                    c.PhoneNumber   = (string)ItemStore.GetValue(iter, 1);                      // number
                    c.Organization  = (string)ItemStore.GetValue(iter, 2);                      // organization
                    c.ContactPerson = (string)ItemStore.GetValue(iter, 3);                      // contact

                    rows.Add(c);
                }
            }
            catch (Exception e) {
                Console.WriteLine("[guitools.on_faxsendbutton_clicked] Exception: {0}", e);
                MessageDialog md;
                md = new MessageDialog(
                    null,
                    DialogFlags.DestroyWithParent,
                    MessageType.Info,
                    ButtonsType.Ok,
                    Catalog.GetString(
                        @"
You have not entered a facsimile number!
Please enter a number and press the <i><b>Enter</b></i> key or
click the <i><b>Phone Book</b></i> button to select numbers or
entire phone books.")
                    );
                md.Run();
                md.Destroy();
                return;
            }

            // get the rest of the rows
            while (ItemStore.IterNext(ref iter))
            {
                try {
                    if ((bool)ItemStore.GetValue(iter, 0))                                      // if send is true (toggle set)

                    {
                        GfaxContact c = new GfaxContact();
                        c.PhoneNumber   = (string)ItemStore.GetValue(iter, 1);                          // number
                        c.Organization  = (string)ItemStore.GetValue(iter, 2);                          // organization
                        c.ContactPerson = (string)ItemStore.GetValue(iter, 3);                          // contact

                        rows.Add(c);
                    }
                }
                catch (Exception e) {
                    Console.WriteLine("[guitools.onfaxsendbutton_clicked] Exception: {0}", e);
                }
            }


            if (SendCheckbutton.Active)
            {
                gfax.timeToSend = DateTime.UtcNow;
            }
            else
            {
                // Convert to UTC for Hylafax
                gfax.timeToSend = (SendDateedit.Time).ToUniversalTime();
            }

            gfax.Destinations = rows;

            //get the fine resolution status
            gfax.sendWizardResolution = ResolutionCheckbutton.Active;
            //get the email flag and email address
            gfax.sendWizardEmailNotify  = EmailCheckbutton.Active;
            gfax.sendWizardEmailAddress = EmailEntry.Text;

            if (gfax.Destinations.Count > 0)
            {
                dosend = true;                  // yes send the fax
            }
            //((Gtk.Window) gxml["NewFaxDialog"]).Hide();
            NewFaxDialog.Hide();
            Application.Quit();
        }
コード例 #19
0
 private void HideCalendarPopup()
 {
     cal_popup.Hide();
 }
コード例 #20
0
 protected virtual void OnClose(object o, EventArgs args)
 {
     Window.Hide();
 }
コード例 #21
0
 public void on_unmap_event(object sender, EventArgs args)
 {
     mainwindow.Hide();
 }
コード例 #22
0
 void OnCancelClicked(object o, EventArgs args)
 {
     //TODO add undo logic
     manage_bookmarks_dialog.Hide();
 }
コード例 #23
0
ファイル: Ventana.cs プロジェクト: albfernandez/gSimple2
        /// <summary>Oculta una ventana.</summary>
        /// <param name="o">El objeto que llama a la función.</param>
        /// <param name="args">Los argumentos.</param>


        public static void OcultarVentana(object o, DeleteEventArgs args)
        {
            Gtk.Window d = (Gtk.Window)o;
            d.Hide();
            args.RetVal = true;
        }
コード例 #24
0
        /// This method is called by Successful login handler, it is called before passphrase verify invocation
        /// The variable used in this method should have been captured during the ClientUpgrade Event handler
        /// This method should only be called during toggling of checkbox on prefs/account page (logout/login)
        public void ShowClientUpgradeMessageBox()
        {
            if (this.NewClientVersion == null || this.ClientUpgradeStatus == null || this.NewClientDomainID == null)
            {
                return;                 // no handler was generated/caught for ClientUpgradeAvailable
            }

            if (ClientUpgradeDialog != null)
            {
                return;                 // This dialog is already showing
            }
            if (DomainController.upgradeStatus.statusCode == StatusCodes.ServerOld)
            {
                ClientUpgradeDialog = new iFolderMsgDialog(
                    null,
                    iFolderMsgDialog.DialogType.Info,
                    iFolderMsgDialog.ButtonSet.Ok,
                    Util.GS("iFolder Server Older"),
                    Util.GS("The server is running an older version."),
                    string.Format(Util.GS("The server needs to be upgraded to be connected from this client")));
            }
            else if (DomainController.upgradeStatus.statusCode == StatusCodes.UpgradeNeeded)
            {
                ClientUpgradeDialog = new iFolderMsgDialog(
                    null,
                    iFolderMsgDialog.DialogType.Info,
                    iFolderMsgDialog.ButtonSet.AcceptDeny,
                    Util.GS("iFolder Client Upgrade"),
                    Util.GS("Would you like to download new iFolder Client?"),
                    string.Format(Util.GS("The client needs to be upgraded to be connected to the server")));
            }
            else
            {
                ClientUpgradeDialog = new iFolderMsgDialog(
                    null,
                    iFolderMsgDialog.DialogType.Info,
                    iFolderMsgDialog.ButtonSet.AcceptDeny,
                    Util.GS("iFolder Client Upgrade"),
                    Util.GS("Would you like to download new iFolder Client?"),
                    string.Format(Util.GS("A newer version \"{0}\" of the iFolder Client is available."), this.NewClientVersion));
            }

            int rc = ClientUpgradeDialog.Run();

            ClientUpgradeDialog.Hide();
            ClientUpgradeDialog.Destroy();
            ClientUpgradeDialog = null;

            if (rc == -8)
            {
                bool       bUpdateRunning = false;
                Gtk.Window win            = new Gtk.Window("");
                string     initialPath    = (string)System.IO.Path.GetTempPath();

                Debug.PrintLine(String.Format("Initial Path: {0}", initialPath));
                CopyLocation cp             = new CopyLocation(win, (string)System.IO.Path.GetTempPath());
                string       selectedFolder = "";
                int          rc1            = 0;
                do
                {
                    rc1 = cp.Run();
                    cp.Hide();
                    if (rc1 == (int)ResponseType.Ok)
                    {
                        selectedFolder = cp.iFolderPath.Trim();
                        cp.Destroy();
                        cp = null;
                        break;
                    }
                }while(rc1 == (int)ResponseType.Ok);
                if (cp != null)
                {
                    cp.Destroy();
                    cp = null;
                }
                win.Hide();
                win.Destroy();
                win = null;
                if (rc1 != (int)ResponseType.Ok)
                {
                    Debug.PrintLine("OnClientUpgradeAvailableEvent return");
                    ClientUpgradeDialog = null;
                    return;
                }
                try
                {
                    if (ifws != null)
                    {
                        Debug.PrintLine("ifws.RunClientUpdate");
                        bUpdateRunning = ifws.RunClientUpdate(this.NewClientDomainID, selectedFolder);
                    }
                }
                catch (Exception e)
                {
                    Debug.PrintLine(String.Format("ifws.RunClientUpdate exception :{0}", e.Message));
                    ClientUpgradeDialog = null;
                    return;
                }

                if (bUpdateRunning)
                {
                    ClientUpgradeDialog = new iFolderMsgDialog(
                        null,
                        iFolderMsgDialog.DialogType.Info,
                        iFolderMsgDialog.ButtonSet.Ok,
                        Util.GS("Download Complete..."),
                        Util.GS("Download Finished "),
                        string.Format(Util.GS("The new client rpm's have been downloaded.")));
                    ClientUpgradeDialog.Run();
                    ClientUpgradeDialog.Hide();
                    ClientUpgradeDialog.Destroy();
                    //	QuitiFolder();
                }
                else
                {
                    iFolderMsgDialog dialog = new iFolderMsgDialog(
                        null,
                        iFolderMsgDialog.DialogType.Error,
                        iFolderMsgDialog.ButtonSet.None,
                        Util.GS("Upgrade Failure"),
                        Util.GS("The iFolder client upgrade failed."),
                        Util.GS("Please contact your system administrator."));
                    dialog.Run();
                    dialog.Hide();
                    dialog.Destroy();
                    dialog = null;
                }

                if (DomainController.upgradeStatus.statusCode == StatusCodes.UpgradeNeeded)
                {
                    // Deny login
                    if (domainController.GetDomain(this.NewClientDomainID) != null)
                    {
                        domainController.RemoveDomain(this.NewClientDomainID, false);
                    }
                }
            }
            else             //if(rc == -9)
            {
                if (DomainController.upgradeStatus.statusCode == StatusCodes.ServerOld || DomainController.upgradeStatus.statusCode == StatusCodes.UpgradeNeeded)
                {
                    // Deny login
                    if (domainController.GetDomain(this.NewClientDomainID) != null)
                    {
                        domainController.RemoveDomain(this.NewClientDomainID, false);
                    }
                }
            }
            ClientUpgradeDialog      = null;
            this.ClientUpgradeStatus = null;
            this.NewClientVersion    = null;
            this.NewClientDomainID   = null;
        }
コード例 #25
0
ファイル: chronopic2016.cs プロジェクト: ylatuya/chronojump-1
 private void hideAndNull()
 {
     chronopic_contacts_real_win.Hide();
     chronopic_contacts_real_win = null;
 }
コード例 #26
0
 public void stop_progress()
 {
     _win_progress.Hide();
 }
コード例 #27
0
 public void on_AddButton_clicked(object o, EventArgs args)
 {
     BookmarkManager.AddBookmark(root, combo_to_id [combo.Entry.Text] as string, name_entry.Text, url);
     add_bookmark_dialog.Hide();
     BookmarkManager.Refresh();
 }