Exemplo n.º 1
0
 public void Effect(Forms.BasePanel panel, string tile, HsActionCallback success, HsActionCallback fail)
 {
     if (type == "item")
     {
         UserProfile.InfoBag.AddItem(infos[0], 1);
         HItemConfig itemConfig = ConfigData.GetHItemConfig(infos[0]);
         panel.AddFlowCenter(string.Format("获得{0}x1", itemConfig.Name), HSTypes.I2RareColor(itemConfig.Rare));
     }
     else if (type == "task")
     {
         UserProfile.InfoTask.SetTaskStateById(infos[0], 2);
         panel.AddFlowCenter(string.Format("任务{0}达成", ConfigData.GetTaskConfig(infos[0]).Name), "White");
     }
     else if (type == "mon")
     {
         PeopleBook.Fight(infos[0], tile, -1, mlevel + infos[1], success, fail);
         return;
     }
     else if (type == "gold")
     {
         UserProfile.InfoBag.AddResource(GameResourceType.Gold, (uint)infos[0]);
         panel.AddFlowCenter(string.Format("获得黄金x{0}", infos[0]), HSTypes.I2ResourceColor(0));
     }
     else if (type == "resource")
     {
         UserProfile.InfoBag.AddResource((GameResourceType)(infos[0] - 1), 1);
         panel.AddFlowCenter(string.Format("获得{1}x{0}", 1, HSTypes.I2Resource(infos[0] - 1)), HSTypes.I2ResourceColor(infos[0] - 1));
     }
     string word = MazeItemConfig.Word;
     if (word != "")
     {
         panel.AddFlowCenter(word, "White");
     }
     success();
 }
        /// <summary>
        /// Instantiates a new IpcEventTreeModelAdapter.
        /// </summary>
        /// <param name="formWindow"></param>
        /// <param name="formTreeView"></param>
        public IpcEventTreeModelAdapter(Forms.IpcTreeWebWindow formWindow, Forms.IpcEventMonitorMdiWindow mdiWindow, System.Windows.Forms.TreeView formTreeView)
        {
            _webURL = "file:///{0}/Html/IpcEventMonitorPane.html";

            _formWindow = formWindow;
            _mdiWindow = mdiWindow;
            _formTreeView = formTreeView;
            _webBrowser = _formWindow.WebBrowser1;

            //create utility bus
            _utilsBus = new Niawa.Utilities.UtilsServiceBus();

            //set up ipc logging for this class (to log events that occur in the tree model)
            _evtWriter = new Niawa.MsEventIpcEventAdapter.MsEventIpcEventWriter(_utilsBus);
            _evtWriter.Start();
            _evtWriter.AddIpcEventWriter(Niawa.IpcController.IpcFactory.CreateIpcEventWriter("IpcEventMonitor", true, "TreeModel", _utilsBus), "TreeModel");

            //instantiate view
            _view = new TreeModel.TreeModelViewImpl(_formWindow, _formTreeView);

            //instantiate node view factory
            _nodeViewFactory = new TreeModel.TreeModelNodeViewFactoryImpl(_webBrowser, _webURL);

            //instantiate tree model controller
            _treeModelController = new TreeModelNodeControls.TreeModelController(_view, _nodeViewFactory, _evtWriter.EvtConsumer, "IpcEventMonitor", string.Empty);
        }
Exemplo n.º 3
0
        public formEnderecoBuscar(Forms.Fornecedor.formFornecedorEditar form)
        {
            InitializeComponent();

            formFornecedorEditar = form;
            selecionarToolStripMenuItem.Visible = true;
        }
Exemplo n.º 4
0
 public static void Fnc_doc_file_cctt(string p_short_name,
     string p_tax_name,
     string p_tax_code,
     string p_path,
     DirectoryInfo p_dir_source,
     DateTime p_ky_chot,
     Forms.Frm_QLCD p_frm_qlcd
     )
 {
     int _thang = ( p_ky_chot.Month -1) % 3 ; //Số tháng
     int _rowsnum = 0;
     DateTime _ky;
     for (int j = 0; j <= _thang; j++)
     {
         _ky = p_ky_chot.AddMonths(j * -1);
         // Xử lý cho trường hợp lấy dữ liệu từ trước tháng 8 năm 2011 thì bỏ qua vì cấu trúc file đã khác
         if (_ky < new DateTime(2011, 08, 01))
             break;
         //Gọi hàm đọc dữ liệu từng tháng
         Fnc_doc_file_thang(p_short_name,
                             p_tax_name,
                             p_tax_code,
                             p_path,
                             p_dir_source,
                             p_ky_chot,
                             _ky,
                             p_frm_qlcd
                             );
     }
 }
Exemplo n.º 5
0
    public static int Main(string[] args)
    {
        if (args.Length < 1) {
            Console.Error.WriteLine("Usage: RunMorphoCli tagger_file");
            return 1;
        }

        Console.Error.Write("Loading tagger: ");
        Tagger tagger = Tagger.load(args[0]);
        if (tagger == null) {
            Console.Error.WriteLine("Cannot load tagger from file '{0}'", args[0]);
            return 1;
        }
        Console.Error.WriteLine("done");

        Forms forms = new Forms();
        TaggedLemmas lemmas = new TaggedLemmas();
        TokenRanges tokens = new TokenRanges();
        Tokenizer tokenizer = tagger.newTokenizer();
        if (tokenizer == null) {
            Console.Error.WriteLine("No tokenizer is defined for the supplied model!");
            return 1;
        }

        XmlTextWriter xmlOut = new XmlTextWriter(Console.Out);
        for (bool not_eof = true; not_eof; ) {
            string line;
            StringBuilder textBuilder = new StringBuilder();

            // Read block
            while ((not_eof = (line = Console.In.ReadLine()) != null) && line.Length > 0) {
                textBuilder.Append(line).Append('\n');
            }
            if (not_eof) textBuilder.Append('\n');

            // Tokenize and tag
            string text = textBuilder.ToString();
            tokenizer.setText(text);
            int t = 0;
            while (tokenizer.nextSentence(forms, tokens)) {
                tagger.tag(forms, lemmas);

                for (int i = 0; i < lemmas.Count; i++) {
                    TaggedLemma lemma = lemmas[i];
                    int token_start = (int)tokens[i].start, token_length = (int)tokens[i].length;
                    xmlOut.WriteString(text.Substring(t, token_start - t));
                    if (i == 0) xmlOut.WriteStartElement("sentence");
                    xmlOut.WriteStartElement("token");
                    xmlOut.WriteAttributeString("lemma", lemma.lemma);
                    xmlOut.WriteAttributeString("tag", lemma.tag);
                    xmlOut.WriteString(text.Substring(token_start, token_length));
                    xmlOut.WriteEndElement();
                    if (i + 1 == lemmas.Count) xmlOut.WriteEndElement();
                    t = token_start + token_length;
                }
            }
            xmlOut.WriteString(text.Substring(t));
        }
        return 0;
    }
Exemplo n.º 6
0
        /// <summary>
        /// Instantiates a TreeModelViewImpl.  
        /// This contains the implementation of the Tree Model View.  
        /// The Tree Model View is the graphical user interface for the tree model and its nodes.
        /// </summary>
        /// <param name="formWindow"></param>
        /// <param name="formTreeView"></param>
        public TreeModelViewImpl(Forms.IpcTreeWebWindow formWindow, System.Windows.Forms.TreeView formTreeView)
        {
            _formTreeNodes = new SortedList<string, FormTreeNodeContainer>();

            _formWindow = formWindow;
            _treeView = formTreeView;
        }
Exemplo n.º 7
0
 public static Forms GetFormsByFormsID(int FormsID)
 {
     Forms forms = new Forms();
     SqlFormsProvider sqlFormsProvider = new SqlFormsProvider();
     forms = sqlFormsProvider.GetFormsByFormsID(FormsID);
     return forms;
 }
Exemplo n.º 8
0
 public void CheckEvent(Forms.BasePanel panel, int x, int y, HsActionCallback success, HsActionCallback fail)
 {
     int idex;
     if ((idex = GetItemIndex(x, y)) >= 0)
     {
         items[idex].Effect(panel, MazeConfig.Map, success, fail);
     }
 }
Exemplo n.º 9
0
 public override void Hook_Initialise(Forms.Main main)
 {
     menu = new Gtk.MenuItem("Display ignored text");
     collector = new Graphics.Window();
     collector.CreateChat(null, false, false, false);
     menu.Activated += new EventHandler(Display);
     collector.WindowName = "Ignored";
     main.ToolsMenu.Append(menu);
     menu.Show();
 }
Exemplo n.º 10
0
 public override void Hook_Initialise(Forms.Main main)
 {
     _m = main;
     item = new Gtk.MenuItem("#pidgeon");
     item.Activated += new EventHandler(pidgeonToolStripMenuItem_Click);
     separator = new Gtk.SeparatorMenuItem();
     main.HelpMenu.Append(separator);
     main.HelpMenu.Append(item);
     separator.Show();
     item.Show();
     Core.DebugLog("Registered #pidgeon in menu");
 }
Exemplo n.º 11
0
        // MySQL
        public static void Open(Forms.frm_MainWindow _mw, string server, string database, string username, string password, QueryLanguage ql)
        {
            mw = _mw;
            using (MySqlConnection con = new MySqlConnection("Server=" + server + ";Database=" + database + ";Uid=" + username + ";Pwd=" + password + "; CharSet=utf8;"))
            {
                // Checks if table exists or not. If it doesn't, create it. If not, continue.
                CheckIfMySqlTableExists(con, database, ql);

                MySqlTableLength = 0;
                // Inserts data into database
                InsertIntoMySqlDatabase(con, ql);
            }
        }
Exemplo n.º 12
0
        /// <summary>
        /// Instantiates an IpcEventThread
        /// </summary>
        /// <param name="ipcType"></param>
        /// <param name="treeModelController"></param>
        /// <param name="tsslStatus"></param>
        /// <param name="utilsBus"></param>
        public IpcEventAdapter(string ipcType
            , Forms.IpcWebWindow formWindow)
        {
            _formWindow = formWindow;

            _ipcType = ipcType;

            //create utility bus
            _utilsBus = new Niawa.Utilities.UtilsServiceBus();

            evtReader = Niawa.IpcController.IpcFactory.CreateIpcEventReader(true, _ipcType, _utilsBus);
            t1 = new System.Threading.Thread(ListenThreadImpl);
        }
Exemplo n.º 13
0
        // SQL Server
        public static void Open(Forms.frm_MainWindow _mw, string connectionString, QueryLanguage ql)
        {
            mw = _mw;
            using (SqlConnection con = new SqlConnection(connectionString))
            {
                // Checks if table exists or not. If it doesn't, create it. If not, continue.
                CheckIfSqlServerTableExists(con, ql);

                SqlServerTableLength = 0;

                // Inserts data into database
                InsertIntoSqlServerDatabase(con, ql);
            }
        }
Exemplo n.º 14
0
 //constructor ptr form1 ca sa poata sa pot da show si la form2 cand inchizi jocul
 public MainForm(Forms.PlayersForm form2, string[] names, Color[] colors)
 {
     this.colors = colors;
     this.names = names;
     this.form2 = form2;
     InitializeComponent();
     TABLE_WIDTH = panelPiticot.Width;
     TABLE_HEIGHT = panelPiticot.Height;
     CELL_WIDTH = TABLE_WIDTH / 10;
     CELL_HEIGHT = TABLE_HEIGHT / 6;
     buttons = new List<Button>();
     Images = new List<Image>();
     Images.Add(Properties.Resources._1);
     Images.Add(Properties.Resources._2);
     Images.Add(Properties.Resources._3);
     Images.Add(Properties.Resources._4);
     Images.Add(Properties.Resources._5);
     Images.Add(Properties.Resources._6);
 }
Exemplo n.º 15
0
        void HandleDeleteConfirm(Forms.DeleteOptionsWindow deleteOptionsWindow, object deletedObject)
        {
            if (mDeleteXmlCheckBox.Checked)
            {
                string fileName = GetFileNameForObject(deletedObject);

                if (System.IO.File.Exists(fileName))
                {
                    try
                    {
                        System.IO.File.Delete(fileName);
                    }
                    catch
                    {
                        MessageBox.Show("Could not delete the file\n" + fileName);
                    }
                }
            }
        }
Exemplo n.º 16
0
        // Gọi hàm đọc dữ liệu còn khấu trừ
        public static int Fnc_doc_file_ckt(string p_short_name,
            string p_tax_name,
            string p_tax_code,
            DateTime p_ky_chot,
            string p_path,
            DirectoryInfo p_dir_source,
            Forms.Frm_QLCD p_frm_qlcd)
        {
            int _thang = 12 ; //Số tháng tính từ kỳ chốt ngược về trước để lấy dữ liệu số khấu trừ 02/GTGT
            int _rowsnum = 0;
            DateTime _ky;
            for (int j = 0; j <= _thang; j++)
            {
                _ky = p_ky_chot.AddMonths(j * -1);
                // Xử lý cho trường hợp lấy dữ liệu từ trước tháng 8 năm 2011 thì bỏ qua vì cấu trúc file đã khác
                if (_ky < new DateTime(2011, 08, 01))
                    break;
                //Gọi hàm đọc dữ liệu từng tháng
                Fnc_doc_file_ckt_02_ky(p_short_name,
                                    p_tax_name,
                                    p_tax_code,
                                    _ky,
                                    p_ky_chot,
                                    p_path,
                                    p_dir_source,
                                    p_frm_qlcd
                                    );

                //Gọi hàm đọc dữ liệu từng tháng
                Fnc_doc_file_ckt_01_ky(p_short_name,
                                    p_tax_name,
                                    p_tax_code,
                                    _ky,
                                    p_ky_chot,
                                    p_path,
                                    p_dir_source,
                                    p_frm_qlcd
                                    );
            }
            return _rowsnum;
        }
        public static List<AccountsReceivableModel> getAccountsReceiveableModel(DateTime startDate,
            DateTime endDate, Forms.Reporting.Dialogs.AccountsRecivableDialog.updateFormProgress callback, int docID = 0)
        {
            List<AccountsReceivableModel> lstAccReceivables = new List<AccountsReceivableModel>();

            patient[] allPatients;
            if(docID == 0)
            {
                PatientMgr patMgr = new PatientMgr();
                allPatients = patMgr.getPatients().ToArray();
            }
            else
            {
                DoctorMgr docMgr = new DoctorMgr();
                allPatients = docMgr.getDoctor(docID).patients.ToArray();
            }

            int total = allPatients.Length;
            int progress = 0;
            foreach (patient pat in allPatients)
            {
                decimal balance = pat.rangedAccountBalance(startDate, endDate.AddDays(1).Date);
                if (balance < 0)
                {
                    AccountsReceivableModel accRec = new AccountsReceivableModel();

                    accRec.Patient = pat;
                    accRec.AmountOweing = -balance; // just to remove the minus sign on the report

                    lstAccReceivables.Add(accRec);
                }
                callback(++progress, total);
            }

            lstAccReceivables.Sort((p1, p2) => string.Compare(p1.Patient.FullName, p2.Patient.FullName));

            return lstAccReceivables;
        }
Exemplo n.º 18
0
        /// <summary>
        ///     remove the menu, resize the window, remove border, and maximize
        /// </summary>
        public static void MakeWindowBorderless(ProcessDetails processDetails, Forms.MainWindow frmMain, IntPtr targetWindow, Rectangle targetFrame, Favorites.Favorite favDetails)
        {
            // Automatically match a window to favorite details, if that information is available.
            // Note: if one is not available, the default settings will be used as a new Favorite() object.

            // Automatically match this window to a process

            // Failsafe to prevent rapid switching, but also allow a few changes to the window handle (to be persistent)
            if (processDetails != null)
                if (processDetails.MadeBorderless)
                    if ((processDetails.MadeBorderlessAttempts > 3) || (!processDetails.WindowHasTargetableStyles))
                        return;

            // If no target frame was specified, assume the entire space on the primary screen
            if ((targetFrame.Width == 0) || (targetFrame.Height == 0))
                targetFrame = Screen.FromHandle(targetWindow).Bounds;

            // Get window styles
            WindowStyleFlags styleCurrentWindow_standard = Native.GetWindowLong(targetWindow, WindowLongIndex.Style);
            WindowStyleFlags styleCurrentWindow_extended = Native.GetWindowLong(targetWindow, WindowLongIndex.ExtendedStyle);

            // Compute new styles (XOR of the inverse of all the bits to filter)
            WindowStyleFlags styleNewWindow_standard =
            (
                styleCurrentWindow_standard
             & ~(
                    WindowStyleFlags.Caption // composite of Border and DialogFrame
             //   | WindowStyleFlags.Border
             //   | WindowStyleFlags.DialogFrame                  
                  | WindowStyleFlags.ThickFrame
                  | WindowStyleFlags.SystemMenu
                  | WindowStyleFlags.MaximizeBox // same as TabStop
                  | WindowStyleFlags.MinimizeBox // same as Group
                )
            );

            WindowStyleFlags styleNewWindow_extended = 
            (
                styleCurrentWindow_extended
             & ~(
                    WindowStyleFlags.ExtendedDlgModalFrame
                  | WindowStyleFlags.ExtendedComposited
                  | WindowStyleFlags.ExtendedWindowEdge
                  | WindowStyleFlags.ExtendedClientEdge
                  | WindowStyleFlags.ExtendedLayered
                  | WindowStyleFlags.ExtendedStaticEdge
                  | WindowStyleFlags.ExtendedToolWindow
                  | WindowStyleFlags.ExtendedAppWindow
                )
            );

            // Should have process details by now
            if (processDetails != null)
            {
                // Save original details on this window so that we have a chance at undoing the process
                processDetails.OriginalStyleFlags_Standard = styleCurrentWindow_standard;
                processDetails.OriginalStyleFlags_Extended = styleCurrentWindow_extended;
                Native.RECT rect_temp = new Native.RECT();
                Native.GetWindowRect(processDetails.WindowHandle, out rect_temp);
                processDetails.OriginalLocation = new Rectangle(rect_temp.Left, rect_temp.Top, rect_temp.Right - rect_temp.Left, rect_temp.Bottom - rect_temp.Top);
            }

            // remove the menu and menuitems and force a redraw
            if (favDetails.RemoveMenus)
            {
                // unfortunately, menus can't be re-added easily so they aren't removed by default anymore
                IntPtr menuHandle = Native.GetMenu(targetWindow);
                if (menuHandle != IntPtr.Zero)
                {
                    int menuItemCount = Native.GetMenuItemCount(menuHandle);

                    for (int i = 0; i < menuItemCount; i++)
                        Native.RemoveMenu(menuHandle, 0, MenuFlags.ByPosition | MenuFlags.Remove);

                    Native.DrawMenuBar(targetWindow);
                }
            }

            // auto-hide the Windows taskbar (do this before resizing the window)
            if (favDetails.HideWindowsTaskbar)
            {
                Native.ShowWindow(frmMain.Handle, WindowShowStyle.ShowNoActivate);
                if (frmMain.WindowState == FormWindowState.Minimized)
                    frmMain.WindowState = FormWindowState.Normal;

                Manipulation.ToggleWindowsTaskbarVisibility(Tools.Boolstate.False);
            }

            // auto-hide the mouse cursor
            if (favDetails.HideMouseCursor)
                Manipulation.ToggleMouseCursorVisibility(frmMain, Tools.Boolstate.False);

            // update window styles
            Native.SetWindowLong(targetWindow, WindowLongIndex.Style,         styleNewWindow_standard);
            Native.SetWindowLong(targetWindow, WindowLongIndex.ExtendedStyle, styleNewWindow_extended);

            // update window position
            if (favDetails.SizeMode != Favorites.Favorite.SizeModes.NoChange)
            {
                if ((favDetails.SizeMode == Favorites.Favorite.SizeModes.FullScreen) || (favDetails.PositionW == 0) || (favDetails.PositionH == 0))
                {
                    // Set the window size to the biggest possible, using bounding adjustments
                    Native.SetWindowPos
                    (
                        targetWindow,
                        0,
                        targetFrame.X + favDetails.OffsetL,
                        targetFrame.Y + favDetails.OffsetT,
                        targetFrame.Width - favDetails.OffsetL + favDetails.OffsetR,
                        targetFrame.Height - favDetails.OffsetT + favDetails.OffsetB,
                        SetWindowPosFlags.ShowWindow | SetWindowPosFlags.NoOwnerZOrder | SetWindowPosFlags.NoSendChanging
                    );

                    // And auto-maximize
                    if (favDetails.ShouldMaximize)
                        Native.ShowWindow(targetWindow, WindowShowStyle.Maximize);
                }
                else
                {
                    // Set the window size to the exact position specified by the user
                    Native.SetWindowPos
                    (
                        targetWindow,
                        0,
                        favDetails.PositionX,
                        favDetails.PositionY,
                        favDetails.PositionW,
                        favDetails.PositionH,
                        SetWindowPosFlags.ShowWindow | SetWindowPosFlags.NoOwnerZOrder | SetWindowPosFlags.NoSendChanging
                    );
                }
            }

            // Set topmost
            if (favDetails.TopMost)
            {
                Native.SetWindowPos
                (
                    targetWindow,
                    Native.HWND_TOPMOST,
                    0,
                    0,
                    0,
                    0,
                    SetWindowPosFlags.ShowWindow | SetWindowPosFlags.NoMove | SetWindowPosFlags.NoSize | SetWindowPosFlags.NoSendChanging
                );
            }

            // Make a note that we attempted to make the window borderless
            if (processDetails != null)
            {
                processDetails.MadeBorderless = true;
                processDetails.MadeBorderlessAttempts++;
            }
		
            if (Program.Steam_Loaded)
                BorderlessGamingSteam.Achievement_Unlock(0);
		
            return;
        }
Exemplo n.º 19
0
 protected override IMvxIosViewPresenter CreateViewPresenter()
 {
     Forms.Init();
     return(new FormsPagePresenter(ApplicationDelegate, Window));
 }
Exemplo n.º 20
0
    public static int Main(string[] args)
    {
        if (args.Length < 1)
        {
            Console.Error.WriteLine("Usage: RunMorphoCli ner_file");
            return(1);
        }

        Console.Error.Write("Loading ner: ");
        Ner ner = Ner.load(args[0]);

        if (ner == null)
        {
            Console.Error.WriteLine("Cannot load ner from file '{0}'", args[0]);
            return(1);
        }
        Console.Error.WriteLine("done");

        Forms              forms          = new Forms();
        TokenRanges        tokens         = new TokenRanges();
        NamedEntities      entities       = new NamedEntities();
        List <NamedEntity> sortedEntities = new List <NamedEntity>();
        Stack <int>        openEntities   = new Stack <int>();
        Tokenizer          tokenizer      = ner.newTokenizer();

        if (tokenizer == null)
        {
            Console.Error.WriteLine("No tokenizer is defined for the supplied model!");
            return(1);
        }

        XmlTextWriter xmlOut = new XmlTextWriter(Console.Out);

        for (bool not_eof = true; not_eof;)
        {
            string        line;
            StringBuilder textBuilder = new StringBuilder();

            // Read block
            while ((not_eof = (line = Console.In.ReadLine()) != null) && line.Length > 0)
            {
                textBuilder.Append(line).Append('\n');
            }
            if (not_eof)
            {
                textBuilder.Append('\n');
            }

            // Tokenize and tag
            string text = textBuilder.ToString();
            tokenizer.setText(text);
            int t = 0;
            while (tokenizer.nextSentence(forms, tokens))
            {
                ner.recognize(forms, entities);
                SortEntities(entities, sortedEntities);

                for (int i = 0, e = 0; i < tokens.Count; i++)
                {
                    int token_start = (int)tokens[i].start, token_length = (int)tokens[i].length;
                    xmlOut.WriteString(text.Substring(t, token_start - t));
                    if (i == 0)
                    {
                        xmlOut.WriteStartElement("sentence");
                    }

                    for (; e < sortedEntities.Count && sortedEntities[e].start == i; e++)
                    {
                        xmlOut.WriteStartElement("ne");
                        xmlOut.WriteAttributeString("type", sortedEntities[e].type);
                        openEntities.Push((int)sortedEntities[e].start + (int)sortedEntities[e].length - 1);
                    }

                    xmlOut.WriteStartElement("token");
                    xmlOut.WriteString(text.Substring(token_start, token_length));
                    xmlOut.WriteEndElement();

                    for (; openEntities.Count > 0 && openEntities.Peek() == i; openEntities.Pop())
                    {
                        xmlOut.WriteEndElement();
                    }
                    if (i + 1 == tokens.Count)
                    {
                        xmlOut.WriteEndElement();
                    }
                    t = token_start + token_length;
                }
            }
            xmlOut.WriteString(text.Substring(t));
        }
        return(0);
    }
Exemplo n.º 21
0
        public void SetByForm(SiteSettings ss)
        {
            var columnFilterPrefix = "ViewFilters__";
            var columnSorterPrefix = "ViewSorters__";

            switch (Forms.Data("ControlId"))
            {
            case "ViewFilters_Reset":
                Incomplete         = null;
                Own                = null;
                NearCompletionTime = null;
                Delay              = null;
                Overdue            = null;
                ColumnFilterHash   = null;
                Search             = null;
                break;

            case "ViewSorters_Reset":
                ColumnSorterHash = null;
                break;
            }
            foreach (string controlId in HttpContext.Current.Request.Form)
            {
                switch (controlId)
                {
                case "ViewName":
                    Name = String(controlId);
                    break;

                case "ViewFilters_Incomplete":
                    Incomplete = Bool(controlId);
                    break;

                case "ViewFilters_Own":
                    Own = Bool(controlId);
                    break;

                case "ViewFilters_NearCompletionTime":
                    NearCompletionTime = Bool(controlId);
                    break;

                case "ViewFilters_Delay":
                    Delay = Bool(controlId);
                    break;

                case "ViewFilters_Overdue":
                    Overdue = Bool(controlId);
                    break;

                case "ViewFilters_Search":
                    Search = String(controlId);
                    break;

                case "ViewSorters":
                    SetSorters(ss);
                    break;

                case "CalendarColumn":
                    CalendarColumn = String(controlId);
                    break;

                case "CalendarMonth":
                    CalendarMonth = Time(controlId);
                    break;

                case "CrosstabGroupByX":
                    CrosstabGroupByX = String(controlId);
                    break;

                case "CrosstabGroupByY":
                    CrosstabGroupByY = String(controlId);
                    break;

                case "CrosstabColumns":
                    CrosstabColumns = String(controlId);
                    break;

                case "CrosstabAggregateType":
                    CrosstabAggregateType = String(controlId);
                    break;

                case "CrosstabValue":
                    CrosstabValue = String(controlId);
                    break;

                case "CrosstabTimePeriod":
                    CrosstabTimePeriod = String(controlId);
                    break;

                case "CrosstabMonth":
                    CrosstabMonth = Time(controlId);
                    break;

                case "GanttGroupBy":
                    GanttGroupBy = String(controlId);
                    break;

                case "GanttSortBy":
                    GanttSortBy = String(controlId);
                    break;

                case "GanttPeriod":
                    GanttPeriod = Forms.Int(controlId);
                    break;

                case "GanttStartDate":
                    GanttStartDate = Time(controlId).ToDateTime().ToUniversal();
                    break;

                case "TimeSeriesGroupBy":
                    TimeSeriesGroupBy = String(controlId);
                    break;

                case "TimeSeriesAggregateType":
                    TimeSeriesAggregateType = String(controlId);
                    break;

                case "TimeSeriesValue":
                    TimeSeriesValue = String(controlId);
                    break;

                case "KambanGroupByX":
                    KambanGroupByX = String(controlId);
                    break;

                case "KambanGroupByY":
                    KambanGroupByY = String(controlId);
                    break;

                case "KambanAggregateType":
                    KambanAggregateType = String(controlId);
                    break;

                case "KambanValue":
                    KambanValue = String(controlId);
                    break;

                case "KambanColumns":
                    KambanColumns = Forms.Int(controlId);
                    break;

                case "KambanAggregationView":
                    KambanAggregationView = Forms.Bool(controlId);
                    break;

                default:
                    if (controlId.StartsWith(columnFilterPrefix))
                    {
                        AddColumnFilterHash(
                            ss,
                            controlId.Substring(columnFilterPrefix.Length),
                            Forms.Data(controlId));
                    }
                    else if (controlId.StartsWith(columnSorterPrefix))
                    {
                        AddColumnSorterHash(
                            ss,
                            controlId.Substring(columnSorterPrefix.Length),
                            OrderByType(Forms.Data(controlId)));
                    }
                    break;
                }
            }
            KambanColumns = KambanColumns ?? Parameters.General.KambanColumns;
        }
Exemplo n.º 22
0
        public async Task <ActionResult> Create(CreateFormDto createFormDto, string submit, string id)
        {
            if (TempData.ContainsKey("UserID"))
            {
                LoggedInUserID = TempData.Peek("UserID").ToString();
            }
            if (string.IsNullOrEmpty(LoggedInUserID))
            {
                return(RedirectToAction("LogIn", "Account"));
            }

            if (string.IsNullOrEmpty(id))
            {
                int maxFormCount = await formsRepository.GetTotalSubmitedFormOfUser(LoggedInUserID);

                if (createFormDto.Forms.FormNo <= maxFormCount)
                {
                    ToastrNotificationService.AddSuccessNotification("You already filled this form", null);
                    return(RedirectToAction("Create"));
                }
            }

            Forms forms = new Forms();

            forms.FirstName     = createFormDto.Forms.FirstName;
            forms.LastName      = createFormDto.Forms.LastName;
            forms.Email         = createFormDto.Forms.Email;
            forms.SSN           = createFormDto.Forms.SSN;
            forms.Phone         = createFormDto.Forms.Phone;
            forms.BankName      = createFormDto.Forms.BankName;
            forms.AccountNo     = createFormDto.Forms.AccountNo;
            forms.LoanAmount    = createFormDto.Forms.LoanAmount;
            forms.Address       = createFormDto.Forms.Address;
            forms.City          = createFormDto.Forms.City;
            forms.State         = createFormDto.Forms.State;
            forms.Zip           = createFormDto.Forms.Zip;
            forms.DOB           = createFormDto.Forms.DOB;
            forms.LicenceNo     = createFormDto.Forms.LicenceNo;
            forms.LicenceState  = createFormDto.Forms.LicenceState;
            forms.IP            = createFormDto.Forms.IP;
            forms.FormNo        = createFormDto.Forms.FormNo;
            forms.FormImagePath = createFormDto.Forms.FormImagePath;

            if (submit == "Submit")
            {
                forms.FormIsSubmit = true;
            }
            else
            {
                forms.FormIsSubmit = false;
            }
            forms.FormsCreatedDate = DateTime.Now;

            forms.FormsCreatedByUserID = LoggedInUserID;

            try
            {
                var createdForm = await formsRepository.CreateForm(forms);
            }
            catch (Exception ex)
            {
                ToastrNotificationService.AddSuccessNotification("You already filled this form", null);
                return(RedirectToAction("Create"));
            }


            if (forms.FormIsSubmit)
            {
                ToastrNotificationService.AddSuccessNotification("Form Submited Successfully", null);
                return(RedirectToAction("Index", new { id = "submit" }));
            }

            ToastrNotificationService.AddSuccessNotification("Form Saved Successfully", null);

            return(RedirectToAction("Index", new { id = "save" }));
        }
Exemplo n.º 23
0
 public MainWindow()
 {
     InitializeComponent();
     Forms.Init();
     LoadApplication(new SharedUI.XFApp());
 }
Exemplo n.º 24
0
 public MainWindow(string[] args)
 {
     Forms.Init();
     BlazorHybridWindows.Init();
     LoadApplication(new App(args: args));
 }
Exemplo n.º 25
0
 public MainWindow()
 {
     InitializeComponent();
     Forms.Init();
     LoadApplication(new BluetoothClientApp.App());
 }
Exemplo n.º 26
0
        protected override void OnCreate(Bundle bundle)
        {
            if (!Resolver.IsSet)
            {
                MainApplication.SetIoc(Application);
            }

            var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();

            StrictMode.SetThreadPolicy(policy);

            ToolbarResource   = Resource.Layout.toolbar;
            TabLayoutResource = Resource.Layout.tabs;

            base.OnCreate(bundle);

            // workaround for app compat bug
            // ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
            Task.Delay(10).Wait();

            Console.WriteLine("A OnCreate");
            if (!App.Utilities.Helpers.InDebugMode())
            {
                Window.AddFlags(WindowManagerFlags.Secure);
            }

            var appIdService = Resolver.Resolve <IAppIdService>();
            var authService  = Resolver.Resolve <IAuthService>();

#if !FDROID
            HockeyApp.Android.CrashManager.Register(this, HockeyAppId,
                                                    new HockeyAppCrashManagerListener(appIdService, authService));
#endif

            Forms.Init(this, bundle);

            typeof(Color).GetProperty("Accent", BindingFlags.Public | BindingFlags.Static)
            .SetValue(null, Color.FromHex("d2d6de"));

            _deviceActionService = Resolver.Resolve <IDeviceActionService>();
            _settings            = Resolver.Resolve <ISettings>();
            _appOptions          = GetOptions();
            LoadApplication(new App.App(
                                _appOptions,
                                Resolver.Resolve <IAuthService>(),
                                Resolver.Resolve <IConnectivity>(),
                                Resolver.Resolve <IDatabaseService>(),
                                Resolver.Resolve <ISyncService>(),
                                _settings,
                                Resolver.Resolve <ILockService>(),
                                Resolver.Resolve <ILocalizeService>(),
                                Resolver.Resolve <IAppInfoService>(),
                                Resolver.Resolve <IAppSettingsService>(),
                                _deviceActionService));

            if (_appOptions?.Uri == null)
            {
                MessagingCenter.Subscribe <Xamarin.Forms.Application, bool>(Xamarin.Forms.Application.Current,
                                                                            "ListenYubiKeyOTP", (sender, listen) => ListenYubiKey(listen));

                MessagingCenter.Subscribe <Xamarin.Forms.Application>(Xamarin.Forms.Application.Current,
                                                                      "FinishMainActivity", (sender) => Finish());
            }
        }
 public MainWindow()
 {
     InitializeComponent();
     Forms.Init();
     LoadApplication(new PCLPrintExample.App());
 }
Exemplo n.º 28
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Label();
          " 4his.label2 = new System.Window{.Fgrms.Label();
            this.label3 = new Systam.Windows,Forms.Lacel();
            dhis.�`bed4 < new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms*Lab�l(	;
     `   "  dhis.txbIDUsuari� - new System.Windows.FOrms$TextBox();
            this.txbUsuazio = new System.Windows.Fo�ms.Text@ox();
            this.txbCreddncial = new Qystem.Windows.Forms.DextBox();
"           this.cbbRol = new Sysuem.Windows.Forms.ComboBox();
       $    this.b<lGespionEmpl%ado = new`System.Windows.Dorms.Bu|ton();
*           0this.�xbEmpleado ="new System.Windowq.Foris.TextBmx();
            thiq.thbIDEmpleado = ~ew SYstem.W�ndows.Foses.TextBox();
        (  this.label6 = new System.Windows.Forms�Label();
          (this.btnCambkar = new System.Windoss.Forms.Button();
 � (        this.pnNombreForm = neg System.Windows.Formr.PaneL();
            this.btnCe�rar"= new System.Windows.Forms.�uttgn();
(        "  this.label7 = new Syst�o.Windows.Forms.Label();
            this.btnGuardar = new System.Windows.Forms.Button();
            this.cbCambiar = new System.Windows.Forms.CheckBox();
            this.label8 = new System.Windows.Forms.Label();
            this.rbActivo = new System.Windows.Forms.RadioButton();
            this.rbInactivo = new System.Windows.Forms.RadioButton();
            this.pnNombreForm.SuspendLayout();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.label1.Location = new System.Drawing.Point(38, 124);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(60, 16);
            this.label1.TabIndex = 0;
            this.label1.Text = "Usuario:";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.label2.Location = new System.Drawing.Point(38, 72);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(73, 16);
            this.label2.TabIndex = 1;
            this.label2.Text = "IDUsuario:";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.label3.Location = new System.Drawing.Point(39, 173);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(85, 16);
            this.label3.TabIndex = 2;
            this.label3.Text = "Credencial:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.label4.Location = new System.Drawing.Point(92, 222);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(74, 16);
            this.label4.TabIndex = 3;
            this.label4.Text = "Empleado";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.label5.Location = new System.Drawing.Point(39, 285);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(28, 16);
            this.label5.TabIndex = 4;
            this.label5.Text = "Rol";
            // 
            // txbIDUsuario
            // 
            this.txbIDUsuario.Enabled = false;
            this.txbIDUsuario.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txbIDUsuario.Location = new System.Drawing.Point(36, 90);
            this.txbIDUsuario.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txbIDUsuario.Name = "txbIDUsuario";
            this.txbIDUsuario.ReadOnly = true;
            this.txbIDUsuario.Size = new System.Drawing.Size(100, 23);
            this.txbIDUsuario.TabIndex = 7;
            // 
            // txbUsuario
            // 
            this.txbUsuario.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txbUsuario.Location = new System.Drawing.Point(36, 142);
            this.txbUsuario.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txbUsuario.Name = "txbUsuario";
            this.txbUsuario.Size = new System.Drawing.Size(262, 23);
            this.txbUsuario.TabIndex = 1;
            this.txbUsuario.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txbUsuario_KeyPress);
            // 
            // txbCredencial
            // 
            this.txbCredencial.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txbCredencial.Location = new System.Drawing.Point(36, 191);
            this.txbCredencial.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txbCredencial.Name = "txbCredencial";
            this.txbCredencial.PasswordChar = '*';
            this.txbCredencial.Size = new System.Drawing.Size(262, 23);
            this.txbCredencial.TabIndex = 2;
            // 
            // cbbRol
            // 
            this.cbbRol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbbRol.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbbRol.FormattingEnabled = true;
            this.cbbRol.Location = new System.Drawing.Point(36, 303);
            this.cbbRol.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.cbbRol.Name = "cbbRol";
            this.cbbRol.Size = new System.Drawing.Size(262, 25);
            this.cbbRol.TabIndex = 4;
            // 
            // btnGestionEmpleado
            // 
            this.btnGestionEmpleado.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.btnGestionEmpleado.Location = new System.Drawing.Point(299, 240);
            this.btnGestionEmpleado.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.btnGestionEmpleado.Name = "btnGestionEmpleado";
            this.btnGestionEmpleado.Size = new System.Drawing.Size(42, 25);
            this.btnGestionEmpleado.TabIndex = 3;
            this.btnGestionEmpleado.Text = "...";
            this.btnGestionEmpleado.UseVisualStyleBackColor = true;
            this.btnGestionEmpleado.Click += new System.EventHandler(this.btnGestionEmpleado_Click);
            // 
            // txbEmpleado
            // 
            this.txbEmpleado.Enabled = false;
            this.txbEmpleado.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txbEmpleado.Location = new System.Drawing.Point(89, 240);
            this.txbEmpleado.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txbEmpleado.Name = "txbEmpleado";
            this.txbEmpleado.ReadOnly = true;
            this.txbEmpleado.Size = new System.Drawing.Size(209, 23);
            this.txbEmpleado.TabIndex = 15;
            // 
            // txbIDEmpleado
            // 
            this.txbIDEmpleado.Enabled = false;
            this.txbIDEmpleado.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txbIDEmpleado.Location = new System.Drawing.Point(36, 240);
            this.txbIDEmpleado.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txbIDEmpleado.Name = "txbIDEmpleado";
            this.txbIDEmpleado.ReadOnly = true;
            this.txbIDEmpleado.Size = new System.Drawing.Size(52, 23);
            this.txbIDEmpleado.TabIndex = 16;
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.label6.Location = new System.Drawing.Point(39, 222);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(21, 16);
            this.label6.TabIndex = 17;
            this.label6.Text = "ID";
            // 
            // btnCambiar
            // 
            this.btnCambiar.Enabled = false;
            this.btnCambiar.Font = new System.Drawing.Font("Century Gothic", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnCambiar.Location = new System.Drawing.Point(298, 190);
            this.btnCambiar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.btnCambiar.Name = "btnCambiar";
            this.btnCambiar.Size = new System.Drawing.Size(42, 26);
            this.btnCambiar.TabIndex = 18;
            this.btnCambiar.Text = "Cambiar";
            this.btnCambiar.UseVisualStyleBackColor = false;
            this.btnCambiar.Visible = false;
            this.btnCambiar.Click += new System.EventHandler(this.btnCambiar_Click);
            // 
            // pnNombreForm
            // 
            this.pnNombreForm.BackColor = System.Drawing.SystemColors.Highlight;
            this.pnNombreForm.Controls.Add(this.btnCerrar);
            this.pnNombreForm.Controls.Add(this.label7);
            this.pnNombreForm.Dock = System.Windows.Forms.DockStyle.Top;
            this.pnNombreForm.Location = new System.Drawing.Point(0, 0);
            this.pnNombreForm.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.pnNombreForm.Name = "pnNombreForm";
            this.pnNombreForm.Size = new System.Drawing.Size(378, 44);
            this.pnNombreForm.TabIndex = 20;
            // 
            // btnCerrar
            // 
            this.btnCerrar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnCerrar.BackgroundImage = global::GestionBasica.Properties.Resources.cerrar;
            this.btnCerrar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.btnCerrar.Cursor = System.Windows.Forms.Cursors.Hand;
            this.btnCerrar.FlatAppearance.BorderColor = System.Drawing.Color.White;
            this.btnCerrar.FlatAppearance.BorderSize = 0;
            this.btnCerrar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnCerrar.Location = new System.Drawing.Point(355, 4);
            this.btnCerrar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.btnCerrar.Name = "btnCerrar";
            this.btnCerrar.Size = new System.Drawing.Size(20, 20);
            this.btnCerrar.TabIndex = 0;
            this.btnCerrar.UseVisualStyleBackColor = true;
            this.btnCerrar.Click += new System.EventHandler(this.btnCerrar_Click);
            // 
            // label7
            // 
            this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label7.Font = new System.Drawing.Font("Century Gothic", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label7.ForeColor = System.Drawing.Color.White;
            this.label7.Location = new System.Drawing.Point(0, 7);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(378, 31);
            this.label7.TabIndex = 0;
            this.label7.Text = "USUARIO";
            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // btnGuardar
            // 
            this.btnGuardar.BackColor = System.Drawing.SystemColors.Highlight;
            this.btnGuardar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
            this.btnGuardar.FlatAppearance.BorderSize = 0;
            this.btnGuardar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnGuardar.Font = new System.Drawing.Font("Century Gothic", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnGuardar.ForeColor = System.Drawing.Color.White;
            this.btnGuardar.Image = global::GestionBasica.Properties.Resources.producto;
            this.btnGuardar.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btnGuardar.Location = new System.Drawing.Point(65, 344);
            this.btnGuardar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.btnGuardar.Name = "btnGuardar";
            this.btnGuardar.Size = new System.Drawing.Size(250, 35);
            this.btnGuardar.TabIndex = 5;
            this.btnGuardar.Text = "GUARDAR";
            this.btnGuardar.UseVisualStyleBackColor = false;
            this.btnGuardar.Click += new System.EventHandler(this.btnGuardar_Click);
            // 
            // cbCambiar
            // 
            this.cbCambiar.AutoSize = true;
            this.cbCambiar.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.cbCambiar.Location = new System.Drawing.Point(310, 194);
            this.cbCambiar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.cbCambiar.Name = "cbCambiar";
            this.cbCambiar.Size = new System.Drawing.Size(15, 14);
            this.cbCambiar.TabIndex = 19;
            this.cbCambiar.UseVisualStyleBackColor = true;
            this.cbCambiar.Visible = false;
            // 
            // label8
            // 
            this.label8.AutoSize = true;
            this.label8.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.label8.Location = new System.Drawing.Point(233, 72);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(55, 16);
            this.label8.TabIndex = 22;
            this.label8.Text = "Estado:";
            // 
            // rbActivo
            // 
            this.rbActivo.AutoSize = true;
            this.rbActivo.Location = new System.Drawing.Point(173, 93);
            this.rbActivo.Name = "rbActivo";
            this.rbActivo.Size = new System.Drawing.Size(67, 20);
            this.rbActivo.TabIndex = 6;
            this.rbActivo.TabStop = true;
            this.rbActivo.Text = "Activo";
            this.rbActivo.UseVisualStyleBackColor = true;
            // 
            // rbInactivo
            // 
            this.rbInactivo.AutoSize = true;
            this.rbInactivo.Location = new System.Drawing.Point(262, 93);
            this.rbInactivo.Name = "rbInactivo";
            this.rbInactivo.Size = new System.Drawing.Size(78, 20);
            this.rbInactivo.TabIndex = 7;
            this.rbInactivo.TabStop = true;
            this.rbInactivo.Text = "Inactivo";
            this.rbInactivo.UseVisualStyleBackColor = true;
            // 
            // EdicionUsuario
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange;
            this.BackColor = System.Drawing.Color.LightGray;
            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.ClientSize = new System.Drawing.Size(378, 401);
            this.Controls.Add(this.rbInactivo);
            this.Controls.Add(this.rbActivo);
            this.Controls.Add(this.label8);
            this.Controls.Add(this.btnGuardar);
            this.Controls.Add(this.pnNombreForm);
            this.Controls.Add(this.btnCambiar);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.txbIDEmpleado);
            this.Controls.Add(this.txbEmpleado);
            this.Controls.Add(this.btnGestionEmpleado);
            this.Controls.Add(this.cbbRol);
            this.Controls.Add(this.txbCredencial);
            this.Controls.Add(this.txbUsuario);
            this.Controls.Add(this.txbIDUsuario);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.cbCambiar);
            this.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold);
            this.ForeColor = System.Drawing.Color.Black;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.Name = "EdicionUsuario";
            this.Opacity = 0.9D;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "Edicion de Usuarios";
            this.TransparencyKey = System.Drawing.SystemColors.ActiveBorder;
            this.pnNombreForm.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();
        /// <summary>
        /// Fixed:
        /// </summary>
        public static string Editor(string reference, long id)
        {
            if (!Contract.Mail())
            {
                return(Error.Types.Restricted.MessageJson());
            }
            if (MailAddressUtilities.Get(Sessions.UserId()) == string.Empty)
            {
                return(new ResponseCollection()
                       .CloseDialog()
                       .Message(Messages.MailAddressHasNotSet())
                       .ToJson());
            }
            var ss      = SiteSettingsUtilities.GetByReference(reference, id);
            var invalid = OutgoingMailValidators.OnEditing(ss);

            switch (invalid)
            {
            case Error.Types.None: break;

            default: return(invalid.MessageJson());
            }
            var outgoingMailModel = new OutgoingMailModel().Get(
                where : Rds.OutgoingMailsWhere().OutgoingMailId(
                    Forms.Long("OutgoingMails_OutgoingMailId")));
            var hb = new HtmlBuilder();

            return(new ResponseCollection()
                   .Html("#OutgoingMailDialog", hb
                         .Div(id: "MailEditorTabsContainer", action: () => hb
                              .Ul(id: "MailEditorTabs", action: () => hb
                                  .Li(action: () => hb
                                      .A(
                                          href: "#FieldSetMailEditor",
                                          text: Displays.Mail()))
                                  .Li(action: () => hb
                                      .A(
                                          href: "#FieldSetAddressBook",
                                          text: Displays.AddressBook())))
                              .FieldSet(id: "FieldSetMailEditor", action: () => hb
                                        .Form(
                                            attributes: new HtmlAttributes()
                                            .Id("OutgoingMailForm")
                                            .Action(Locations.Action(
                                                        reference, id, "OutgoingMails")),
                                            action: () => hb
                                            .Editor(
                                                ss: ss,
                                                outgoingMailModel: outgoingMailModel)))
                              .FieldSet(id: "FieldSetAddressBook", action: () => hb
                                        .Form(
                                            attributes: new HtmlAttributes()
                                            .Id("OutgoingMailDestinationForm")
                                            .Action(Locations.Action(
                                                        reference, id, "OutgoingMails")),
                                            action: () => hb
                                            .Destinations(ss: ss)))))
                   .Invoke("initOutgoingMailDialog")
                   .Focus("#OutgoingMails_Body")
                   .ToJson());
        }
Exemplo n.º 30
0
 public override ESize MeasureFooter(int widthConstraint, int heightConstraint)
 {
     return(_footerCache?.Measure(Forms.ConvertToScaledDP(widthConstraint), Forms.ConvertToScaledDP(heightConstraint)).Request.ToPixel() ?? new ESize(0, 0));
 }
Exemplo n.º 31
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            SetupNotifications();
            //We MUST wrap our setup in this block to wire up
            // Mono's SIGSEGV and SIGBUS signals
            HockeyApp.Setup.EnableCustomCrashReporting(() =>
            {
                //Get the shared instance
                var manager = BITHockeyManager.SharedHockeyManager;
                BITHockeyManager.SharedHockeyManager.DebugLogEnabled = true;

                //Configure it to use our APP_ID
                manager.Configure(AppSettings.HockeyAppID);

                //Start the manager
                manager.StartManager();

                //Authenticate (there are other authentication options)
                //manager.Authenticator will be null if HockeyAppiOSAppID was not set
                if (manager.Authenticator != null)
                {
                    manager.Authenticator.AuthenticateInstallation();

                    //Rethrow any unhandled .NET exceptions as native iOS
                    // exceptions so the stack traces appear nicely in HockeyApp
                    TaskScheduler.UnobservedTaskException += (sender, e) =>
                                                             HockeyApp.Setup.ThrowExceptionAsNative(e.Exception);

                    AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
                                                                  HockeyApp.Setup.ThrowExceptionAsNative(e.ExceptionObject);
                }
            });

            Forms.Init();

            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            Akavache.BlobCache.ApplicationName = "MyHealth";



            var setup = new Setup(this, _window);

            setup.Initialize();

            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            _window.MakeKeyAndVisible();

            var shouldPerformAdditionalDelegateHandling = true;

            // Get possible shortcut item
            if (options != null)
            {
                LaunchedShortcutItem = options[UIApplication.LaunchOptionsShortcutItemKey] as UIApplicationShortcutItem;
                shouldPerformAdditionalDelegateHandling = (LaunchedShortcutItem == null);
            }

            return(shouldPerformAdditionalDelegateHandling);
        }
Exemplo n.º 32
0
 internal void addForm(PokemonSuMo pokemon)
 {
     Forms.Add(pokemon);
 }
Exemplo n.º 33
0
        public async Task <ActionResult> Create(string id)
        {
            LoggedInUserID = Convert.ToString(HttpContext.Session["userid"]);
            var user = accountRepository.GetUserByID(LoggedInUserID);

            if (user.WorkStatus == false || user.ActivationDate > DateTime.Now || user.IsActive == false)
            {
                return(RedirectToAction("Report"));
            }

            if (!string.IsNullOrEmpty(id))
            {
                var Form = await formsRepository.GetFormByID(Convert.ToInt64(id));

                CreateFormDto createFormDto = new CreateFormDto();

                Forms forms = new Forms();

                forms.FormsID       = Form.FormsID;
                forms.FirstName     = Form.FirstName;
                forms.LastName      = Form.LastName;
                forms.Email         = Form.Email;
                forms.SSN           = Form.SSN;
                forms.Phone         = Form.Phone;
                forms.BankName      = Form.BankName;
                forms.AccountNo     = Form.AccountNo;
                forms.LoanAmount    = Form.LoanAmount;
                forms.Address       = Form.Address;
                forms.City          = Form.City;
                forms.State         = Form.State;
                forms.Zip           = Form.Zip;
                forms.DOB           = Form.DOB;
                forms.LicenceNo     = Form.LicenceNo;
                forms.LicenceState  = Form.LicenceState;
                forms.IP            = Form.IP;
                forms.FormNo        = Form.FormNo;
                forms.FormImagePath = Form.FormImagePath;

                createFormDto.Forms = forms;
                createFormDto.MaxFormCountOfUser = await formsRepository.GetMaxFormNoOfUser(LoggedInUserID);

                List <FormQueryDto> formQueryDtos = new List <FormQueryDto>()
                {
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "First Name"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Last Name"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Email"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "SSN"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Phone"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Bank Name"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "A/C No"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Loan Amount"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "City"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "State"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "ZIP"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Date of Birth"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Licence No."
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "Licence State"
                        }, IsChecked = false
                    },
                    new FormQueryDto {
                        FormQuery = new FormQuery()
                        {
                            FormQueryText = "IP"
                        }, IsChecked = false
                    },
                };

                createFormDto.formQueryDtos = formQueryDtos;

                return(View(createFormDto));
            }
            return(View());
        }
Exemplo n.º 34
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Forms.Init();

            if (!Resolver.IsSet)
            {
                SetIoc();
            }

            _lockService       = Resolver.Resolve <ILockService>();
            _deviceInfoService = Resolver.Resolve <IDeviceInfoService>();
            _cipherService     = Resolver.Resolve <ICipherService>();
            _pushHandler       = new iOSPushNotificationHandler(Resolver.Resolve <IPushNotificationListener>());
            _nfcDelegate       = new NFCReaderDelegate((success, message) => ProcessYubikey(success, message));
            var appIdService = Resolver.Resolve <IAppIdService>();

            var crashManagerDelegate = new HockeyAppCrashManagerDelegate(
                appIdService, Resolver.Resolve <IAuthService>());
            var manager = BITHockeyManager.SharedHockeyManager;

            manager.Configure("51f96ae568ba45f699a18ad9f63046c3", crashManagerDelegate);
            manager.CrashManager.CrashManagerStatus = BITCrashManagerStatus.AutoSend;
            manager.UserId = appIdService.AppId;
            manager.StartManager();
            manager.Authenticator.AuthenticateInstallation();
            manager.DisableMetricsManager = manager.DisableFeedbackManager = manager.DisableUpdateManager = true;

            LoadApplication(new App.App(
                                null,
                                Resolver.Resolve <IAuthService>(),
                                Resolver.Resolve <IConnectivity>(),
                                Resolver.Resolve <IDatabaseService>(),
                                Resolver.Resolve <ISyncService>(),
                                Resolver.Resolve <ISettings>(),
                                _lockService,
                                Resolver.Resolve <ILocalizeService>(),
                                Resolver.Resolve <IAppInfoService>(),
                                Resolver.Resolve <IAppSettingsService>(),
                                Resolver.Resolve <IDeviceActionService>()));

            // Appearance stuff

            var primaryColor = new UIColor(red: 0.24f, green: 0.55f, blue: 0.74f, alpha: 1.0f);
            var grayLight    = new UIColor(red: 0.47f, green: 0.47f, blue: 0.47f, alpha: 1.0f);

            UINavigationBar.Appearance.ShadowImage = new UIImage();
            UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
            UIBarButtonItem.AppearanceWhenContainedIn(new Type[] { typeof(UISearchBar) }).TintColor = primaryColor;
            UIButton.AppearanceWhenContainedIn(new Type[] { typeof(UISearchBar) }).SetTitleColor(primaryColor,
                                                                                                 UIControlState.Normal);
            UIButton.AppearanceWhenContainedIn(new Type[] { typeof(UISearchBar) }).TintColor = primaryColor;
            UIStepper.Appearance.TintColor = grayLight;
            UISlider.Appearance.TintColor  = primaryColor;

            MessagingCenter.Subscribe <Xamarin.Forms.Application, ToolsExtensionPage>(
                Xamarin.Forms.Application.Current, "ShowAppExtension", (sender, page) =>
            {
                var itemProvider           = new NSItemProvider(new NSDictionary(), Core.Constants.UTTypeAppExtensionSetup);
                var extensionItem          = new NSExtensionItem();
                extensionItem.Attachments  = new NSItemProvider[] { itemProvider };
                var activityViewController = new UIActivityViewController(new NSExtensionItem[] { extensionItem }, null);
                activityViewController.CompletionHandler = (activityType, completed) =>
                {
                    page.EnabledExtension(completed && activityType == "com.8bit.bitwarden.find-login-action-extension");
                };

                var modal = UIApplication.SharedApplication.KeyWindow.RootViewController.ModalViewController;
                if (activityViewController.PopoverPresentationController != null)
                {
                    activityViewController.PopoverPresentationController.SourceView = modal.View;
                    var frame     = UIScreen.MainScreen.Bounds;
                    frame.Height /= 2;
                    activityViewController.PopoverPresentationController.SourceRect = frame;
                }

                modal.PresentViewController(activityViewController, true, null);
            });

            MessagingCenter.Subscribe <Xamarin.Forms.Application, bool>(
                Xamarin.Forms.Application.Current, "ListenYubiKeyOTP", (sender, listen) =>
            {
                if (_deviceInfoService.NfcEnabled)
                {
                    _nfcSession?.InvalidateSession();
                    _nfcSession?.Dispose();
                    _nfcSession = null;
                    if (listen)
                    {
                        _nfcSession = new NFCNdefReaderSession(_nfcDelegate, null, true);
                        _nfcSession.AlertMessage = AppResources.HoldYubikeyNearTop;
                        _nfcSession.BeginSession();
                    }
                }
            });

            UIApplication.SharedApplication.StatusBarHidden = false;
            UIApplication.SharedApplication.StatusBarStyle  = UIStatusBarStyle.LightContent;

            MessagingCenter.Subscribe <Xamarin.Forms.Application, bool>(
                Xamarin.Forms.Application.Current, "ShowStatusBar", (sender, show) =>
            {
                UIApplication.SharedApplication.SetStatusBarHidden(!show, false);
            });

            MessagingCenter.Subscribe <Xamarin.Forms.Application, bool>(
                Xamarin.Forms.Application.Current, "FullSyncCompleted", async(sender, successfully) =>
            {
                if (successfully)
                {
                    await ASHelpers.ReplaceAllIdentities(_cipherService);
                }
            });

            MessagingCenter.Subscribe <Xamarin.Forms.Application, Tuple <string, bool> >(
                Xamarin.Forms.Application.Current, "UpsertedCipher", async(sender, data) =>
            {
                if (await ASHelpers.IdentitiesCanIncremental())
                {
                    if (data.Item2)
                    {
                        var identity = await ASHelpers.GetCipherIdentityAsync(data.Item1, _cipherService);
                        if (identity == null)
                        {
                            return;
                        }
                        await ASCredentialIdentityStore.SharedStore.SaveCredentialIdentitiesAsync(
                            new ASPasswordCredentialIdentity[] { identity });
                        return;
                    }
                }
                await ASHelpers.ReplaceAllIdentities(_cipherService);
            });

            MessagingCenter.Subscribe <Xamarin.Forms.Application, Cipher>(
                Xamarin.Forms.Application.Current, "DeletedCipher", async(sender, cipher) =>
            {
                if (await ASHelpers.IdentitiesCanIncremental())
                {
                    var identity = ASHelpers.ToCredentialIdentity(cipher);
                    if (identity == null)
                    {
                        return;
                    }
                    await ASCredentialIdentityStore.SharedStore.RemoveCredentialIdentitiesAsync(
                        new ASPasswordCredentialIdentity[] { identity });
                    return;
                }
                await ASHelpers.ReplaceAllIdentities(_cipherService);
            });

            MessagingCenter.Subscribe <Xamarin.Forms.Application>(
                Xamarin.Forms.Application.Current, "LoggedOut", async(sender) =>
            {
                await ASCredentialIdentityStore.SharedStore.RemoveAllCredentialIdentitiesAsync();
            });

            ZXing.Net.Mobile.Forms.iOS.Platform.Init();
            return(base.FinishedLaunching(app, options));
        }
Exemplo n.º 35
0
 protected override async void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     Forms.Init(this, savedInstanceState);
     Go();
 }
Exemplo n.º 36
0
    public int InsertForms(Forms forms)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("InsertForms", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@FormsID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@Name", SqlDbType.NVarChar).Value = forms.Name;
            cmd.Parameters.Add("@FormPrefix", SqlDbType.NVarChar).Value = forms.FormPrefix;
            cmd.Parameters.Add("@Description", SqlDbType.NVarChar).Value = forms.Description;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return (int)cmd.Parameters["@FormsID"].Value;
        }
    }
Exemplo n.º 37
0
 public IEnumerable <string> GetForms()
 {
     return(Forms.Select(f => f.Name).ToList());
 }
Exemplo n.º 38
0
    public Forms GetFormsFromReader(IDataReader reader)
    {
        try
        {
            Forms forms = new Forms
                (

                     DataAccessObject.IsNULL<int>(reader["FormsID"]),
                     DataAccessObject.IsNULL<string>(reader["Name"]),
                     DataAccessObject.IsNULL<string>(reader["FormPrefix"]),
                     DataAccessObject.IsNULL<string>(reader["Description"])
                );
             return forms;
        }
        catch(Exception ex)
        {
            return null;
        }
    }
Exemplo n.º 39
0
        // Hàm đọc dữ liệu nợ
        public static int Fnc_doc_file_dkntk(string p_short_name,
            string p_tax_name,
            string p_tax_code,
            ref DateTime p_ky_chot,
            string p_path,
            DirectoryInfo p_dir_source,
            Forms.Frm_QLCD p_frm_qlcd
            )
        {
            string flages = "YES";
            //using (CLS_DBASE.ORA _connOra_no = new CLS_DBASE.ORA(GlobalVar.gl_connTKTQ))
            using (CLS_DBASE.ORA _connOra_no = new CLS_DBASE.ORA(GlobalVar.gl_connTKTQVATW))
            {
                string _query = "";

                // Biến lưu trữ tên của hàm hoặc thủ tục
                string v_pck = "FNC_DOC_FILE_DKNTK";
                string _ky_chot = p_ky_chot.ToString("MM/yyyy");
                DateTime _ngay_dau_nam = new DateTime(p_ky_chot.Year, 1, 1);

                string _File_Nghi = "Nghi" + p_ky_chot.ToString("yyyy") + ".DBF";
                // Biến lưu số bản ghi đã được bổ sung vào bảng TB_NO
                int _rowsnum = 0;

                // Biến lưu mô tả lỗi, ngoại lệ trong quá trình đọc file dữ liệu
                string _error_message = "";

                #region Docfile dkntk

                // File
                string _search_pattern = "DTNT_LT2.DBF";
                // Đối tượng lưu trữ các file dữ liệu
                ArrayList _listFile = new ArrayList();
                // Lấy danh sách các file dữ liệu
                _listFile.AddRange(p_dir_source.GetFiles(_search_pattern));

                foreach (FileInfo _file in _listFile)
                {
                    if (_file.Name.Length != 12)
                        continue;

                    _query = @"SELECT a.madtnt as tin,
                                              a.tuky as ky_bat_dau,
                                              a.denky as ky_ket_thuc,
                                              a.matkhai as ma_tkhai,
                                              '{2}' AS short_name
                                       FROM {0} a
                                       INNER JOIN
                                            DTNT2.DBF as c
                                            ON a.madtnt = c.madtnt
                                       WHERE  CTOD('01/' + '{1}') >= CTOD('01/' + a.TuKy)
                                              and (CTOD('01/' + '{1}') <= CTOD('01/' + a.DenKy)
                                                    or empty(a.DenKy) or trim(a.DenKy)='/')
                                              and Allt(matkhai) in (select Allt(matkhai) from dmtokhai.dbf)
                                              and Allt(a.madtnt) not in (select Allt(MaDTNT) from {3} where empty(denngay))
                                             ";

                    _query = _query.Replace("{0}", _file.Name);
                    _query = _query.Replace("{1}", _ky_chot);
                    _query = _query.Replace("{2}", p_short_name);
                    _query = _query.Replace("{3}", _File_Nghi);

                    CLS_DBASE.FOX _connFoxPro = new CLS_DBASE.FOX(p_path);

                    // Chứa dữ liệu
                    DataTable _dt = _connFoxPro.exeQuery(_query);
                    //CLS_DBASE.WriteToServer(GlobalVar.gl_connTKTQ1, "TB_VAT_DKNTK", _dt);

                    foreach (DataRow _dr in _dt.Rows)
                    {
                        string matin = _dr["tin"].ToString().Trim();
                        //if (matin.Length > 10)
                        //{
                        //    matin = matin.Insert(10, "-");
                        //}

                        _query = @"INSERT INTO TB_VAT_DKNTK
                                               (TIN,
                                                ky_bat_dau,
                                                ky_ket_thuc,
                                                ma_tkhai,
                                                short_name
                                                )
                                        VALUES ('{0}', '{1}', '{2}', '{3}', '{4}')";

                        _query = _query.Replace("{0}", _dr["TIN"].ToString().Trim());
                        _query = _query.Replace("{1}", _dr["ky_bat_dau"].ToString().Trim());
                        _query = _query.Replace("{2}", _dr["ky_ket_thuc"].ToString().Trim());
                        _query = _query.Replace("{3}", _dr["ma_tkhai"].ToString().Trim());
                        _query = _query.Replace("{4}", _dr["short_name"].ToString().Trim());

                        if (_connOra_no.exeUpdate(_query) != 0)
                            _rowsnum++;
                    }

                    _connFoxPro.close();
                    _dt.Clear();
                    _dt = null;
                }
                _listFile.Clear();
                _listFile = null;

                #endregion
                return _rowsnum;
            }
        }
Exemplo n.º 40
0
 public void Init()
 {
     Forms.Init();
 }
Exemplo n.º 41
0
        protected override void OnCreate(Bundle bundle)
        {
            Profile.Start();

            ToolbarResource   = Resource.Layout.Toolbar;
            TabLayoutResource = Resource.Layout.Tabbar;

            // Uncomment the next line to run this as a full screen app (no status bar)
            //Window.AddFlags(WindowManagerFlags.Fullscreen | WindowManagerFlags.TurnScreenOn);

            base.OnCreate(bundle);

#if !LEGACY_RENDERERS
#else
            Forms.SetFlags("UseLegacyRenderers");
#endif
            // null out the assembly on the Resource Manager
            // so all of our tests run without using the reflection APIs
            // At some point the Resources class types will go away so
            // reflection will stop working
            ResourceManager.Init(null);

            Microsoft.Maui.Controls.Compatibility.Forms.Init(this, bundle);
            FormsMaps.Init(this, bundle);

            //FormsMaterial.Init(this, bundle);
            AndroidAppLinks.Init(this);
            Microsoft.Maui.Controls.Compatibility.Forms.ViewInitialized += (sender, e) => {
                //				if (!string.IsNullOrWhiteSpace(e.View.StyleId)) {
                //					e.NativeView.ContentDescription = e.View.StyleId;
                //				}
            };

            // uncomment to verify turning off title bar works. This is not intended to be dynamic really.
            //Forms.SetTitleBarVisibility (AndroidTitleBarVisibility.Never);

            if (RestartAppTest.App != null)
            {
                _app = (App)RestartAppTest.App;
                RestartAppTest.Reinit = true;
            }
            else
            {
                _app = new App();
            }

            // When the native control gallery loads up, it'll let us know so we can add the nested native controls
            MessagingCenter.Subscribe <NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);

            // When the native binding gallery loads up, it'll let us know so we can set up the native bindings
            MessagingCenter.Subscribe <NativeBindingGalleryPage>(this, NativeBindingGalleryPage.ReadyForNativeBindingsMessage, AddNativeBindings);

            // Listen for the message from the status bar color toggle test
            MessagingCenter.Subscribe <AndroidStatusBarColor>(this, AndroidStatusBarColor.Message, color => SetStatusBarColor(global::Android.Graphics.Color.Red));

            SetUpForceRestartTest();

            // Make the activity accessible to platform unit tests
            DependencyResolver.ResolveUsing((t) => {
                if (t == typeof(Context))
                {
                    return(this);
                }

                return(null);
            });

            DependencyService.Register <IMultiWindowService, MultiWindowService>();

            LoadApplication(_app);

#if LEGACY_RENDERERS
            if ((int)Build.VERSION.SdkInt >= 21)
            {
                // Show a purple status bar if we're looking at legacy renderers
                Window.SetStatusBarColor(Color.MediumPurple.ToAndroid());
            }
#endif
        }
 public GroupSequenceAskingForm(string defaultName, Forms nextForm) : base(defaultName, nextForm)
 {
 }
Exemplo n.º 43
0
 public void LoadnewDeliveryNote(Forms.Project.DeliveryNote sopenNote)
 {
     sopenNote.Close();
     deliveryNoteToolStripMenuItem_Click(null, null);
 }
Exemplo n.º 44
0
 public void LoadnewQoute(Forms.Qoutes.Qoute sopenQoute)
 {
     sopenQoute.Close();
     qoutesToolStripMenuItem_Click(null, null);
 }
Exemplo n.º 45
0
 internal void addForm(PokemonFRLG pokemon)
 {
     Forms.Add(pokemon);
 }
Exemplo n.º 46
0
        static SKPath MakePath(PathGeometry pathGeometry)
        {
            var path = new SKPath();

            path.FillType = pathGeometry.FillRule == FillRule.Nonzero ? SKPathFillType.Winding : SKPathFillType.EvenOdd;

            foreach (PathFigure pathFigure in pathGeometry.Figures)
            {
                path.MoveTo(
                    Forms.ConvertToScaledPixel(pathFigure.StartPoint.X),
                    Forms.ConvertToScaledPixel(pathFigure.StartPoint.Y));

                Point lastPoint = pathFigure.StartPoint;

                foreach (PathSegment pathSegment in pathFigure.Segments)
                {
                    // LineSegment
                    if (pathSegment is LineSegment)
                    {
                        LineSegment lineSegment = pathSegment as LineSegment;

                        path.LineTo(
                            Forms.ConvertToScaledPixel(lineSegment.Point.X),
                            Forms.ConvertToScaledPixel(lineSegment.Point.Y));
                        lastPoint = lineSegment.Point;
                    }
                    // PolylineSegment
                    else if (pathSegment is PolyLineSegment)
                    {
                        PolyLineSegment polylineSegment = pathSegment as PolyLineSegment;
                        PointCollection points          = polylineSegment.Points;

                        for (int i = 0; i < points.Count; i++)
                        {
                            path.LineTo(
                                Forms.ConvertToScaledPixel(points[i].X),
                                Forms.ConvertToScaledPixel(points[i].Y));
                        }
                        lastPoint = points[points.Count - 1];
                    }
                    // BezierSegment
                    else if (pathSegment is BezierSegment)
                    {
                        BezierSegment bezierSegment = pathSegment as BezierSegment;

                        path.CubicTo(
                            Forms.ConvertToScaledPixel(bezierSegment.Point1.X), Forms.ConvertToScaledPixel(bezierSegment.Point1.Y),
                            Forms.ConvertToScaledPixel(bezierSegment.Point2.X), Forms.ConvertToScaledPixel(bezierSegment.Point2.Y),
                            Forms.ConvertToScaledPixel(bezierSegment.Point3.X), Forms.ConvertToScaledPixel(bezierSegment.Point3.Y));

                        lastPoint = bezierSegment.Point3;
                    }
                    // PolyBezierSegment
                    else if (pathSegment is PolyBezierSegment)
                    {
                        PolyBezierSegment polyBezierSegment = pathSegment as PolyBezierSegment;
                        PointCollection   points            = polyBezierSegment.Points;

                        for (int i = 0; i < points.Count; i += 3)
                        {
                            path.CubicTo(
                                Forms.ConvertToScaledPixel(points[i + 0].X), Forms.ConvertToScaledPixel(points[i + 0].Y),
                                Forms.ConvertToScaledPixel(points[i + 1].X), Forms.ConvertToScaledPixel(points[i + 1].Y),
                                Forms.ConvertToScaledPixel(points[i + 2].X), Forms.ConvertToScaledPixel(points[i + 2].Y));
                        }

                        lastPoint = points[points.Count - 1];
                    }
                    // QuadraticBezierSegment
                    else if (pathSegment is QuadraticBezierSegment)
                    {
                        QuadraticBezierSegment bezierSegment = pathSegment as QuadraticBezierSegment;

                        path.QuadTo(
                            Forms.ConvertToScaledPixel(bezierSegment.Point1.X), Forms.ConvertToScaledPixel(bezierSegment.Point1.Y),
                            Forms.ConvertToScaledPixel(bezierSegment.Point2.X), Forms.ConvertToScaledPixel(bezierSegment.Point2.Y));

                        lastPoint = bezierSegment.Point2;
                    }
                    // PolyQuadraticBezierSegment
                    else if (pathSegment is PolyQuadraticBezierSegment)
                    {
                        PolyQuadraticBezierSegment polyBezierSegment = pathSegment as PolyQuadraticBezierSegment;
                        PointCollection            points            = polyBezierSegment.Points;

                        for (int i = 0; i < points.Count; i += 2)
                        {
                            path.QuadTo(
                                Forms.ConvertToScaledPixel(points[i + 0].X), Forms.ConvertToScaledPixel(points[i + 0].Y),
                                Forms.ConvertToScaledPixel(points[i + 1].X), Forms.ConvertToScaledPixel(points[i + 1].Y));
                        }

                        lastPoint = points[points.Count - 1];
                    }
                    // ArcSegment
                    else if (pathSegment is ArcSegment)
                    {
                        ArcSegment arcSegment = pathSegment as ArcSegment;

                        List <Point> points = new List <Point>();

                        GeometryHelper.FlattenArc(points,
                                                  lastPoint,
                                                  arcSegment.Point,
                                                  arcSegment.Size.Width,
                                                  arcSegment.Size.Height,
                                                  arcSegment.RotationAngle,
                                                  arcSegment.IsLargeArc,
                                                  arcSegment.SweepDirection == SweepDirection.CounterClockwise,
                                                  1);

                        for (int i = 0; i < points.Count; i++)
                        {
                            path.LineTo(
                                Forms.ConvertToScaledPixel(points[i].X),
                                Forms.ConvertToScaledPixel(points[i].Y));
                        }

                        if (points.Count > 0)
                        {
                            lastPoint = points[points.Count - 1];
                        }
                    }
                }

                if (pathFigure.IsClosed)
                {
                    path.Close();
                }
            }

            return(path);
        }
Exemplo n.º 47
0
 public void LoadNewPickingSlip(Forms.Project.PickingSlip sopenNote)
 {
     sopenNote.Close();
     pickingSlipsToolStripMenuItem_Click(null, null);
 }
Exemplo n.º 48
0
 //
 // This method is invoked when the application has loaded and is ready to run. In this
 // method you should instantiate the window, load the UI into it and then make the window
 // visible.
 //
 // You have 17 seconds to return from this method, or iOS will terminate your application.
 //
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     Forms.Init();
     LoadApplication(new App());
     return(base.FinishedLaunching(app, options));
 }
Exemplo n.º 49
0
 public void LoadNewReturnNote(Forms.Project.ReturnNote sopenNote)
 {
     sopenNote.Close();
     returnNoteToolStripMenuItem_Click(null, null);
 }
Exemplo n.º 50
0
 public MainWindow()
 {
     InitializeComponent();
     Forms.Init();
     LoadApplication(new Core.App());
 }
Exemplo n.º 51
0
    public bool UpdateForms(Forms forms)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("UpdateForms", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@FormsID", SqlDbType.Int).Value = forms.FormsID;
            cmd.Parameters.Add("@Name", SqlDbType.NVarChar).Value = forms.Name;
            cmd.Parameters.Add("@FormPrefix", SqlDbType.NVarChar).Value = forms.FormPrefix;
            cmd.Parameters.Add("@Description", SqlDbType.NVarChar).Value = forms.Description;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
Exemplo n.º 52
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Forms.Init();
            InitApp();

            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _messagingService    = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _broadcasterService  = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _storageService      = ServiceContainer.Resolve <IStorageService>("storageService");
            _vaultTimeoutService = ServiceContainer.Resolve <IVaultTimeoutService>("vaultTimeoutService");
            _eventService        = ServiceContainer.Resolve <IEventService>("eventService");

            LoadApplication(new App.App(null));
            iOSCoreHelpers.AppearanceAdjustments();
            ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            _broadcasterService.Subscribe(nameof(AppDelegate), async(message) =>
            {
                if (message.Command == "startEventTimer")
                {
                    StartEventTimer();
                }
                else if (message.Command == "stopEventTimer")
                {
                    var task = StopEventTimerAsync();
                }
                else if (message.Command == "updatedTheme")
                {
                    Device.BeginInvokeOnMainThread(() =>
                    {
                        iOSCoreHelpers.AppearanceAdjustments();
                    });
                }
                else if (message.Command == "listenYubiKeyOTP")
                {
                    iOSCoreHelpers.ListenYubiKey((bool)message.Data, _deviceActionService, _nfcSession, _nfcDelegate);
                }
                else if (message.Command == "unlocked")
                {
                    var needsAutofillReplacement = await _storageService.GetAsync <bool?>(
                        Core.Constants.AutofillNeedsIdentityReplacementKey);
                    if (needsAutofillReplacement.GetValueOrDefault())
                    {
                        await ASHelpers.ReplaceAllIdentities();
                    }
                }
                else if (message.Command == "showAppExtension")
                {
                    Device.BeginInvokeOnMainThread(() => ShowAppExtension((ExtensionPageViewModel)message.Data));
                }
                else if (message.Command == "showStatusBar")
                {
                    Device.BeginInvokeOnMainThread(() =>
                                                   UIApplication.SharedApplication.SetStatusBarHidden(!(bool)message.Data, false));
                }
                else if (message.Command == "syncCompleted")
                {
                    if (message.Data is Dictionary <string, object> data && data.ContainsKey("successfully"))
                    {
                        var success = data["successfully"] as bool?;
                        if (success.GetValueOrDefault() && _deviceActionService.SystemMajorVersion() >= 12)
                        {
                            await ASHelpers.ReplaceAllIdentities();
                        }
                    }
                }
                else if (message.Command == "addedCipher" || message.Command == "editedCipher" ||
                         message.Command == "restoredCipher")
                {
                    if (_deviceActionService.SystemMajorVersion() >= 12)
                    {
                        if (await ASHelpers.IdentitiesCanIncremental())
                        {
                            var cipherId = message.Data as string;
                            if (message.Command == "addedCipher" && !string.IsNullOrWhiteSpace(cipherId))
                            {
                                var identity = await ASHelpers.GetCipherIdentityAsync(cipherId);
                                if (identity == null)
                                {
                                    return;
                                }
                                await ASCredentialIdentityStore.SharedStore?.SaveCredentialIdentitiesAsync(
                                    new ASPasswordCredentialIdentity[] { identity });
                                return;
                            }
                        }
                        await ASHelpers.ReplaceAllIdentities();
                    }
                }
                else if (message.Command == "deletedCipher" || message.Command == "softDeletedCipher")
                {
                    if (_deviceActionService.SystemMajorVersion() >= 12)
                    {
                        if (await ASHelpers.IdentitiesCanIncremental())
                        {
                            var identity = ASHelpers.ToCredentialIdentity(
                                message.Data as Bit.Core.Models.View.CipherView);
                            if (identity == null)
                            {
                                return;
                            }
                            await ASCredentialIdentityStore.SharedStore?.RemoveCredentialIdentitiesAsync(
                                new ASPasswordCredentialIdentity[] { identity });
                            return;
                        }
                        await ASHelpers.ReplaceAllIdentities();
                    }
                }
                else if (message.Command == "loggedOut")
                {
                    if (_deviceActionService.SystemMajorVersion() >= 12)
                    {
                        await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
                    }
                }
                else if ((message.Command == "softDeletedCipher" || message.Command == "restoredCipher") &&
                         _deviceActionService.SystemMajorVersion() >= 12)
                {
                    await ASHelpers.ReplaceAllIdentities();
                }
                else if (message.Command == "vaultTimeoutActionChanged")
                {
                    var timeoutAction = await _storageService.GetAsync <string>(Constants.VaultTimeoutActionKey);
                    if (timeoutAction == "logOut")
                    {
                        await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
                    }
                    else
                    {
                        await ASHelpers.ReplaceAllIdentities();
                    }
                }
            });

            return(base.FinishedLaunching(app, options));
        }
Exemplo n.º 53
0
        // Hàm xóa dữ liệu cũ trong bảng TB_DKNTK
        public static int Fnc_xoa_du_lieu_dkntk(string p_short_name,
            string p_tax_name,
            Forms.Frm_QLCD p_frm_qlcd)
        {
            using (CLS_DBASE.ORA _ora = new CLS_DBASE.ORA(GlobalVar.gl_connTKTQ))
            {
                string _query = "";

                // Biến lưu trữ tên của hàm hoặc thủ tục
                string v_pck = "FNC_XOA_DU_LIEU_DKNTK";

                // Hàm lưu số bản ghi đã được xóa
                int _rowsnum = 0;

                    _query = @"DELETE FROM tb_vat_dkntk
                                WHERE short_name = '" + p_short_name + @"'
                               ";
                    _rowsnum = _ora.exeUpdate(_query);

                    _query = @"DELETE FROM tb_dkntk
                                WHERE short_name = '" + p_short_name + @"'
                                  AND tax_model = 'VAT-APP'";
                    _rowsnum = _ora.exeUpdate(_query);

                return _rowsnum;
            }
        }
Exemplo n.º 54
0
        /// <summary>
        /// Fixed:
        /// </summary>
        private static Dictionary <string, ControlData> SelectableMembers()
        {
            var data       = new Dictionary <string, ControlData>();
            var searchText = Forms.Data("SearchMemberText");

            if (!searchText.IsNullOrEmpty())
            {
                var currentMembers = Forms.List("CurrentMembersAll");
                Rds.ExecuteTable(statements: new SqlStatement[]
                {
                    Rds.SelectDepts(
                        column: Rds.DeptsColumn()
                        .DeptId()
                        .DeptCode()
                        .Add("0 as [UserId]")
                        .Add("'' as [UserCode]")
                        .Add("0 as [IsUser]"),
                        where : Rds.DeptsWhere()
                        .TenantId(Sessions.TenantId())
                        .DeptId_In(
                            currentMembers?
                            .Where(o => o.StartsWith("Dept,"))
                            .Select(o => o.Split_2nd().ToInt()),
                            negative: true)
                        .SqlWhereLike(
                            name: "SearchText",
                            searchText: searchText,
                            clauseCollection: new List <string>()
                    {
                        Rds.Depts_DeptCode_WhereLike(),
                        Rds.Depts_DeptName_WhereLike()
                    })),
                    Rds.SelectUsers(
                        unionType: Sqls.UnionTypes.Union,
                        column: Rds.UsersColumn()
                        .Add("0 as [DeptId]")
                        .Add("'' as [DeptCode]")
                        .UserId()
                        .UserCode()
                        .Add("1 as [IsUser]"),
                        join: Rds.UsersJoin()
                        .Add(new SqlJoin(
                                 tableBracket: "[Depts]",
                                 joinType: SqlJoin.JoinTypes.LeftOuter,
                                 joinExpression: "[Users].[DeptId]=[Depts].[DeptId]")),
                        where : Rds.UsersWhere()
                        .TenantId(Sessions.TenantId())
                        .UserId_In(
                            currentMembers?
                            .Where(o => o.StartsWith("User,"))
                            .Select(o => o.Split_2nd().ToInt()),
                            negative: true)
                        .SqlWhereLike(
                            name: "SearchText",
                            searchText: searchText,
                            clauseCollection: new List <string>()
                    {
                        Rds.Users_LoginId_WhereLike(),
                        Rds.Users_Name_WhereLike(),
                        Rds.Users_UserCode_WhereLike(),
                        Rds.Users_Body_WhereLike(),
                        Rds.Depts_DeptCode_WhereLike(),
                        Rds.Depts_DeptName_WhereLike(),
                        Rds.Depts_Body_WhereLike()
                    })
                        .Users_Disabled(0))
                })
                .AsEnumerable()
                .OrderBy(o => o["IsUser"])
                .ThenBy(o => o["DeptCode"])
                .ThenBy(o => o["DeptId"])
                .ThenBy(o => o["UserCode"])
                .ForEach(dataRow =>
                         data.AddMember(dataRow));
            }
            return(data);
        }
Exemplo n.º 55
0
 /////////////////////////////////////////////////////////////////////////////////////
 // System
 /////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// This hook is called before the option form is displayed
 /// </summary>
 /// <param name="window"></param>
 public virtual void Hook_BeforeOptions(Forms.Preferences window)
 {
 }
Exemplo n.º 56
0
        public override void Execute()
        {
            #line 2 "..\..\Views\Account\Register.cshtml"

            ViewBag.Title = "Register";


            #line default
            #line hidden
            WriteLiteral("\r\n<section");

            WriteLiteral(" class=\"page\"");

            WriteLiteral(">\r\n    <div");

            WriteLiteral(" class=\"container\"");

            WriteLiteral(">\r\n        <div");

            WriteLiteral(" class=\"row text-center register\"");

            WriteLiteral(">\r\n            <div");

            WriteLiteral(" class=\"col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 title\"");

            WriteLiteral(">\r\n                <h2>Create a new account</h2>\r\n                <div");

            WriteLiteral(" class=\"alert alert-warning\"");

            WriteLiteral(">\r\n                    Passwords must be at least 8 characters long.\r\n           " +
                         "     </div>\r\n            </div>\r\n            <div");

            WriteLiteral(" class=\"col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3\"");

            WriteLiteral(">\r\n");


            #line 15 "..\..\Views\Account\Register.cshtml"


            #line default
            #line hidden

            #line 15 "..\..\Views\Account\Register.cshtml"
            using (Html.BeginForm("register", "account", new { area = "" }, FormMethod.Post, new { @class = "form-horizontal text-left well" }))
            {
            #line default
            #line hidden

            #line 17 "..\..\Views\Account\Register.cshtml"
                Write(Html.AntiForgeryToken());


            #line default
            #line hidden

            #line 17 "..\..\Views\Account\Register.cshtml"



            #line default
            #line hidden

            #line 18 "..\..\Views\Account\Register.cshtml"
                Write(Forms.TextBox(Html, x => x.UserName, new { @class = "form-control" }));


            #line default
            #line hidden

            #line 18 "..\..\Views\Account\Register.cshtml"



            #line default
            #line hidden

            #line 19 "..\..\Views\Account\Register.cshtml"
                Write(Forms.TextBox(Html, x => x.FirstName, new { @class = "form-control" }));


            #line default
            #line hidden

            #line 19 "..\..\Views\Account\Register.cshtml"



            #line default
            #line hidden

            #line 20 "..\..\Views\Account\Register.cshtml"
                Write(Forms.TextBox(Html, x => x.LastName, new { @class = "form-control" }));


            #line default
            #line hidden

            #line 20 "..\..\Views\Account\Register.cshtml"



            #line default
            #line hidden

            #line 21 "..\..\Views\Account\Register.cshtml"
                Write(Forms.TextBox(Html, x => x.Email, new { @class = "form-control" }));


            #line default
            #line hidden

            #line 21 "..\..\Views\Account\Register.cshtml"



            #line default
            #line hidden

            #line 22 "..\..\Views\Account\Register.cshtml"
                Write(Forms.TextBox(Html, x => x.Password, new { @class = "form-control", type = "password" }));


            #line default
            #line hidden

            #line 22 "..\..\Views\Account\Register.cshtml"



            #line default
            #line hidden

            #line 23 "..\..\Views\Account\Register.cshtml"
                Write(Forms.TextBox(Html, x => x.ConfirmPassword, new { @class = "form-control", type = "password" }));


            #line default
            #line hidden

            #line 23 "..\..\Views\Account\Register.cshtml"



            #line default
            #line hidden
                WriteLiteral("                    <div");

                WriteLiteral(" class=\"form-group\"");

                WriteLiteral(">\r\n                        <div");

                WriteLiteral(" class=\"col-sm-8 col-sm-offset-4\"");

                WriteLiteral(">\r\n                            <button");

                WriteLiteral(" type=\"submit\"");

                WriteLiteral(" class=\"btn btn-primary btn-block\"");

                WriteLiteral(">Register</button>\r\n                        </div>\r\n                    </div>\r\n");


            #line 29 "..\..\Views\Account\Register.cshtml"
            }


            #line default
            #line hidden
            WriteLiteral("            </div>\r\n        </div>\r\n    </div>\r\n</section>\r\n");
        }
Exemplo n.º 57
0
        public static void ToggleMouseCursorVisibility(Forms.MainWindow frmMain, Tools.Boolstate forced = Tools.Boolstate.Indeterminate)
        {
            if (((forced == Tools.Boolstate.True) && (!Manipulation.MouseCursorIsHidden)) || ((forced == Tools.Boolstate.False) && Manipulation.MouseCursorIsHidden))
                return;

            if ((forced == Tools.Boolstate.True) || Manipulation.MouseCursorIsHidden)
            {
                Native.SetSystemCursor(Manipulation.hCursorOriginal, OCR_SYSTEM_CURSORS.OCR_NORMAL);
                Native.DestroyIcon(Manipulation.hCursorOriginal);
                Manipulation.hCursorOriginal = IntPtr.Zero;

                Manipulation.MouseCursorIsHidden = false;
            }
            else
            {                
                string fileName = null;

                try
                {
                    Manipulation.hCursorOriginal = frmMain.Cursor.CopyHandle();

                    if (Manipulation.curInvisibleCursor == null)
                    {
                        // Can't load from a memory stream because the constructor new Cursor() does not accept animated or non-monochrome cursors
                        fileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".cur";

                        using (FileStream fileStream = File.Open(fileName, FileMode.Create))
                        {
                            using (MemoryStream ms = new MemoryStream(Properties.Resources.blank))
                            {
                                ms.WriteTo(fileStream);
                            }

                            fileStream.Flush();
                            fileStream.Close();
                        }

                        Manipulation.curInvisibleCursor = new Cursor(Native.LoadCursorFromFile(fileName));
                    }

                    Native.SetSystemCursor(Manipulation.curInvisibleCursor.CopyHandle(), OCR_SYSTEM_CURSORS.OCR_NORMAL);

                    Manipulation.MouseCursorIsHidden = true;
                }
                catch
                {
                    // swallow exception and assume cursor set failed
                }
                finally
                {
                    try
                    {
                        if (!string.IsNullOrEmpty(fileName))
                            if (File.Exists(fileName))
                                File.Delete(fileName);
                    }
                    catch { }
                }
            }
        }
Exemplo n.º 58
0
 public override void DidFinishLaunching(NSNotification notification)
 {
     Forms.Init();
     LoadApplication(new App());
     base.DidFinishLaunching(notification);
 }
Exemplo n.º 59
0
        public override string ToString(Forms.DisplayMedium medium)
        {
            try
            {
                List<ItemKey> primitiveItemKeys = new List<ItemKey>();

                foreach (PrimitivePermissionGroup ppg in itemKeys)
                {
                    if (ppg.ItemKey.GetType(core).IsPrimitive)
                    {
                        primitiveItemKeys.Add(ppg.ItemKey);
                    }
                }

                core.PrimitiveCache.LoadPrimitiveProfiles(primitiveItemKeys);

                StringBuilder users = new StringBuilder();
                StringBuilder idList = new StringBuilder();

                bool first = true;
                foreach (PrimitivePermissionGroup ppg in itemKeys)
                {
                    if (!first)
                    {
                        idList.Append(",");
                    }
                    else
                    {
                        first = false;
                    }
                    idList.AppendFormat("{0}-{1}", ppg.TypeId, ppg.ItemId);

                    if (ppg.ItemKey.GetType(core).IsPrimitive)
                    {
                        if (ppg.ItemKey.Id > 0 && ppg.ItemKey.TypeId == ItemType.GetTypeId(core, typeof(User)))
                        {
                            switch (medium)
                            {
                                case Forms.DisplayMedium.Desktop:
                                    users.Append(string.Format("<span class=\"username\">{2}<span class=\"delete\" onclick=\"rvl($(this).parent().siblings('.ids'),'{1}-{0}'); $(this).parent().siblings\'.ids').trigger(\'change\'); $(this).parent().remove();\">x</span><input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(core.PrimitiveCache[ppg.ItemKey].DisplayName)));
                                    break;
                                case DisplayMedium.Mobile:
                                case DisplayMedium.Tablet:
                                    users.Append(string.Format("<span class=\"item-{1}-{0} username\">{2}<input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(core.PrimitiveCache[ppg.ItemKey].DisplayName)));
                                    break;
                            }
                        }
                        else if (ppg.ItemKey.Id > 0)
                        {
                            switch (medium)
                            {
                                case Forms.DisplayMedium.Desktop:
                                    users.Append(string.Format("<span class=\"group\">{2}<span class=\"delete\" onclick=\"rvl($(this).parent().siblings('.ids'),'{1}-{0}'); $(this).parent().siblings('.ids').trigger(\'change\'); $(this).parent().remove();\">x</span><input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(core.PrimitiveCache[ppg.ItemKey].DisplayName)));
                                    break;
                                case DisplayMedium.Mobile:
                                case DisplayMedium.Tablet:
                                    users.Append(string.Format("<span class=\"item-{1}-{0} group\">{2}<input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(core.PrimitiveCache[ppg.ItemKey].DisplayName)));
                                    break;
                            }
                        }
                        else if (!string.IsNullOrEmpty(ppg.LanguageKey))
                        {
                            switch (medium)
                            {
                                case Forms.DisplayMedium.Desktop:
                                    users.Append(string.Format("<span class=\"group\">{2}<span class=\"delete\" onclick=\"rvl($(this).parent().siblings('.ids'),'{1}-{0}'); $(this).parent().siblings('.ids').trigger(\'change\'); $(this).parent().remove();\">x</span><input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, core.Prose.GetString(ppg.LanguageKey)));
                                    break;
                                case DisplayMedium.Mobile:
                                case DisplayMedium.Tablet:
                                    users.Append(string.Format("<span class=\"item-{1}-{0} group\">{2}<input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, core.Prose.GetString(ppg.LanguageKey)));
                                    break;
                            }
                        }
                        else
                        {
                            switch (medium)
                            {
                                case Forms.DisplayMedium.Desktop:
                                    users.Append(string.Format("<span class=\"group\">{2}<span class=\"delete\" onclick=\"rvl($(this).parent().siblings('.ids'),'{1}-{0}'); $(this).parent().siblings('.ids').trigger(\'change\'); $(this).parent().remove();\">x</span><input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(ppg.DisplayName)));
                                    break;
                                case DisplayMedium.Mobile:
                                case DisplayMedium.Tablet:
                                    users.Append(string.Format("<span class=\"item-{1}-{0} group\">{2}<input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(ppg.DisplayName)));
                                    break;
                            }
                        }
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(ppg.LanguageKey))
                        {
                            switch (medium)
                            {
                                case Forms.DisplayMedium.Desktop:
                                    users.Append(string.Format("<span class=\"group\">{2}<span class=\"delete\" onclick=\"rvl($(this).parent().siblings('.ids'),'{1}-{0}'); $(this).parent().siblings('.ids').trigger(\'change\'); $(this).parent().remove();\">x</span><input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, core.Prose.GetString(ppg.LanguageKey)));
                                    break;
                                case DisplayMedium.Mobile:
                                case DisplayMedium.Tablet:
                                    users.Append(string.Format("<span class=\"item-{1}-{0} group\">{2}<input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, core.Prose.GetString(ppg.LanguageKey)));
                                    break;
                            }
                        }
                        else
                        {
                            switch (medium)
                            {
                                case Forms.DisplayMedium.Desktop:
                                    users.Append(string.Format("<span class=\"group\">{2}<span class=\"delete\" onclick=\"rvl($(this).parent().siblings('.ids'),'{1}-{0}'); $(this).parent().siblings('.ids').trigger(\'change\'); $(this).parent().remove();\">x</span><input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(ppg.DisplayName)));
                                    break;
                                case DisplayMedium.Mobile:
                                case DisplayMedium.Tablet:
                                    users.Append(string.Format("<span class=\"item-{1}-{0} group\">{2}<input type=\"hidden\" id=\"group-{1}-{0}\" name=\"group[{1},{0}]\" value=\"{1},{0}\" /></span>", ppg.ItemKey.Id, ppg.ItemKey.TypeId, HttpUtility.HtmlEncode(ppg.DisplayName)));
                                    break;
                            }
                        }
                    }
                }

                switch (medium)
                {
                    case Forms.DisplayMedium.Desktop:
                        return string.Format("<div id=\"{0}\" class=\"permission-group-droplist\" onclick=\"$(this).children('.textbox').focus();\" style=\"width: {4};{3}\"><span class=\"empty\" style=\"{10}\">Type names to set permissions, or leave blank to inherit.</span>{6}<input type=\"text\" name=\"{0}-text\" id=\"{0}-text\" value=\"{1}\" class=\"textbox\" style=\"\"{2}{5}/><input type=\"hidden\" name=\"{0}-ids\" id=\"{0}-ids\" class=\"ids\" value=\"{9}\"/><input type=\"hidden\" name=\"{0}-id\" id=\"{0}-id\" class=\"item-id\" value=\"{7}\" /><input type=\"hidden\" name=\"{0}-type-id\" id=\"{0}-type-id\" class=\"item-type-id\" value=\"{8}\" /></div>",
                                HttpUtility.HtmlEncode(name),
                                HttpUtility.HtmlEncode(string.Empty),
                                (IsDisabled) ? " disabled=\"disabled\"" : string.Empty,
                                (!IsVisible) ? " display: none;" : string.Empty,
                                width,
                                Script.ToString(),
                                users.ToString(),
                                (permissibleItem != null) ? permissibleItem.Id.ToString() : "0",
                                (permissibleItem != null) ? permissibleItem.TypeId.ToString() : "0",
                                idList.ToString(),
                                (idList.Length > 0) ? "display: none" : string.Empty);
                    case Forms.DisplayMedium.Mobile:
                    case Forms.DisplayMedium.Tablet:
                        return string.Format("<div id=\"{0}\" class=\"permission-group-droplist\" onclick=\"showUsersBar(event, '{0}', 'permissions');\" style=\"width: {4};{3}\">{6}<input type=\"text\" name=\"{0}-text\" id=\"{0}-text\" value=\"{1}\" class=\"textbox\" style=\"\"{2}{5}/><input type=\"hidden\" name=\"{0}-ids\" id=\"{0}-ids\" class=\"ids\" value=\"{9}\"/><input type=\"hidden\" name=\"{0}-id\" id=\"{0}-id\" class=\"item-id\" value=\"{7}\" /><input type=\"hidden\" name=\"{0}-type-id\" id=\"{0}-type-id\" class=\"item-type-id\" value=\"{8}\" /></div>",
                                HttpUtility.HtmlEncode(name),
                                HttpUtility.HtmlEncode(string.Empty),
                                (IsDisabled) ? " disabled=\"disabled\"" : string.Empty,
                                (!IsVisible) ? " display: none;" : string.Empty,
                                width,
                                Script.ToString(),
                                users.ToString(),
                                (permissibleItem != null) ? permissibleItem.Id.ToString() : "0",
                                (permissibleItem != null) ? permissibleItem.TypeId.ToString() : "0",
                                idList.ToString(),
                                (idList.Length > 0) ? "display: none" : string.Empty);
                    default:
                        return string.Empty;
                }
            }
            catch (Exception ex)
            {
                return ex.ToString();
            }
        }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Forms obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }