Exemplo n.º 1
0
        public GtkToolbar(Window parent, ToolbarModel model)
        {
            this.Updating     = false;
            this.ToolbarStyle = ToolbarStyle.Icons;
            this.Tooltips     = false;

            buttons = new ToolbarItem[model.Count];
            for (int i = 0; i < buttons.Length; i++)
            {
                buttons[i] = new ToolbarItem(this, model, i);
                this.Insert(buttons[i], -1);
            }

            ToolItem space = new ToolItem();

            space.Expand = true;
            ToolButton info = new ToolButton(Stock.Info);

            info.Clicked += (sender, args) => {
                GtkAbout.ShowAbout(parent);
            };
            this.Insert(space, -1);
            this.Insert(info, -1);

            model.ToolbarChangedEvent += (sender, e) => SetSelected(e.Value);
        }
Exemplo n.º 2
0
 public ListadoLotesModel()
 {
     Toolbar                  = new ToolbarModel();
     Toolbar.Titulo           = General.Lotes;
     Toolbar.Operacion        = TipoOperacion.Custom;
     Toolbar.CustomAction     = true;
     Toolbar.CustomActionName = "Index";
 }
Exemplo n.º 3
0
 // GET: Dictionary/ProductionLoss
 public override ActionResult Index(RowPosition?position, bool cms = false)
 {
     base.Index(position, cms);
     toolbar = ToolbarHelper.GetDefaultToolbar("Typy strat");
     Set(DataKey.Toolbar, toolbar);
     Set(DataKey.Cms, cms);
     Session.Remove("ReturnAction");
     return(PartialView(MVC.Dictionary.ProductionLossDIC.Views.Index, LoadGridSettings()));
 }
Exemplo n.º 4
0
        public BaseModel()
        {
            createNewPrimaryKey();

            _toolbar = new ToolbarModel()
            {
                Titulo = DisplayName
            };
        }
Exemplo n.º 5
0
 internal ToolbarItem(GtkToolbar toolbar, ToolbarModel model, int i)
 {
     this.IconWidget = GtkMain.GetImage(model.GetImageName(i));
     this.Index      = i;
     this.Toggled   += (sender, e) => {
         if (!toolbar.Updating)
         {
             model.Selected = this.Active ? i : -1;
         }
     };
 }
Exemplo n.º 6
0
        public MainPresenter CreateMainPresenter()
        {
            ToolbarView     toolbarView     = new ToolbarView();
            TextInputView   textInputView   = new TextInputView();
            WordCounterView wordCounterView = new WordCounterView();
            StatusBarView   statusBarView   = new StatusBarView();

            ToolbarModel toolbarModel = new ToolbarModel();
            //ToolbarPresenter toolbarPresenter = new ToolbarPresenter(toolbarView, toolbarModel);

            IModalDialogBuilder modalDialogBuilder = new ModalDialogBuilder();

            IFileSelectionView     fileSelectionView  = new FileSelectionView();
            FileSelectionModel     fileSelectionModel = new FileSelectionModel();
            FileSelectionPresenter openFilePresenter  = new FileSelectionPresenter(fileSelectionView, fileSelectionModel);

            TextInputModel     textInputModel     = new TextInputModel(fileSelectionModel);
            TextInputPresenter textInputPresenter = new TextInputPresenter(textInputView, textInputModel);

            WordFrequencyCounter wordFrequencyCounter = new WordFrequencyCounter();
            WordCounterModel     wordCounterModel     = new WordCounterModel(wordFrequencyCounter);
            WordCounterPresenter wordCounterPresenter = new WordCounterPresenter(wordCounterView, wordCounterModel);

            RunButtonNavigator runButtonNavigator = new RunButtonNavigator(toolbarView, wordCounterModel);

            MainView      mainView      = new MainView(toolbarView, textInputView, wordCounterView, statusBarView);
            MainModel     mainModel     = new MainModel();
            MainPresenter mainPresenter = new MainPresenter(mainView, mainModel);

            AboutView      aboutView      = new AboutView();
            AboutModel     aboutModel     = new AboutModel();
            AboutPresenter aboutPresenter = new AboutPresenter(aboutView, aboutModel);

            RunButtonNavigator   navigation           = new RunButtonNavigator(toolbarView, wordCounterModel);
            AboutButtonNavigator aboutButtonNavigator = new AboutButtonNavigator(toolbarView, aboutView);
            TextSynchronizer     modelConnector       = new TextSynchronizer(wordCounterModel, textInputModel);

            IFileSelectionDisplay fileSelectionDisplay = new FileSelectionDisplay(fileSelectionModel);

            ILoadTextFromFile           loadTextFromFile            = new LoadTextFromFile(fileSelectionDisplay);
            LoadTextFromFileToTextInput loadTextFromFileToTextInput = new LoadTextFromFileToTextInput(loadTextFromFile, textInputModel);
            FileSelectionNavigator      openFileButtonNavigator     = new FileSelectionNavigator(toolbarView, loadTextFromFileToTextInput);

            TextInputLoader textInputLoader = new TextInputLoader(textInputModel, fileSelectionModel);

            /*
             * Wyświetlanie MsgBox
             * Obsługa błędów otwarcia pliku
             */

            return(mainPresenter);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Retrieve the specified toolbar by its name
        /// </summary>
        /// <param name="useremail"></param>
        /// <param name="rooturl"></param>
        /// <param name="encodedId"></param>
        /// <param name="toolbarname"></param>
        public async Task <ToolbarModel> GetToolbar(string useremail, string rooturl, string encodedId, string toolbarname)
        {
            ToolbarModel result = null;

            if (string.IsNullOrEmpty(useremail) || string.IsNullOrEmpty(rooturl) || string.IsNullOrEmpty(encodedId) ||
                string.IsNullOrEmpty(toolbarname))
            {
                return(null);
            }

            string queryname  = WebTasksTypeConstants.GetToolbarByName;
            string queryterms = WebApiServices.GetJsonQuerySearchTermsToolbarname(useremail, toolbarname);
            string url        = $"{rooturl}api/webtasks?queryname={queryname}&queryterms={queryterms}";

            LoggingService service   = new LoggingService();
            var            stopwatch = new Stopwatch();

            try
            {
                var response = await new WebApiServices().GetData(url, encodedId);
                if (!string.IsNullOrEmpty(response) && response.Length > 0)
                {
                    result = new SerializerServices().DeserializeObject <ToolbarModel>(response.NormalizeJsonString());
                }
            }
            catch (Exception ex)
            {
                service.TrackException(ex);
                throw;
            }
            finally
            {
                stopwatch.Stop();
                var properties = new Dictionary <string, string>
                {
                    { "UserEmail", useremail },
                    { "WebServicesEndpoint", rooturl },
                    { "EncodedId", encodedId },
                    { "ToolbarName", toolbarname }
                };
                service.TrackEvent(LoggingServiceConstants.GetToolbar, stopwatch.Elapsed, properties);
            }
            return(result);
        }
Exemplo n.º 8
0
 public LotesModel()
 {
     Toolbar           = new ToolbarModel();
     Toolbar.Titulo    = General.Lotes;
     Toolbar.Operacion = TipoOperacion.Ver;
 }
 public PresupuestosAsistenteModel(IContextService context)
 {
     _toolbar = new ToolbarPresupuestosAsistenteModel();
 }
 public AsistentePedidosComprasModel()
 {
     _toolbar = new ToolbarAsistentePedidosComprasModel();
 }
Exemplo n.º 11
0
 public AsistenteFacturacionModel()
 {
     _toolbar = new ToolbarAsistenteFacturacionModel();
 }
 public CambioUbicacionModel()
 {
     _toolbar = new ToolbarCambioUbicacionModel();
 }
 public AsistenteMovimientosTesoreriaModel(IContextService context)
 {
     _toolbar = new ToolbarAsistenteMovimientosTesoreriaModel();
 }
 public AsistenteSeccionesAnaliticasModel()
 {
     _toolbar = new ToolbarAsistenteSeccionesAnaliticasModel();
 }
Exemplo n.º 15
0
 public Exportar()
 {
     _toolbar = new ToolbarExportar();
 }
Exemplo n.º 16
0
 public AsistenteCuentasModel()
 {
     _toolbar = new ToolbarAsistenteCuentasModel();
 }
Exemplo n.º 17
0
 public void ResetToDefaults()
 {
     AppUserPreferences.Instance.ToolbarModel = toolbarModel = AppUserPreferences.DefaultToolbarModel();
     Initialize();
     TangerineApp.Instance.Toolbar.Rebuild(toolbarModel);
 }
Exemplo n.º 18
0
 public AsistenteMovsModel()
 {
     _toolbar = new ToolbarAsistenteMovsModel();
 }
 public AsistenteRemedirStockModel(IContextService context)
 {
     _toolbar  = new ToolbarAsistenteRemedirLotesModel();
     Fkalmacen = context.Fkalmacen;
 }
Exemplo n.º 20
0
 public AsistenteAsignacionModel(IContextService context)
 {
     _toolbar = new ToolbarAsistenteAsignacionModel();
 }