Пример #1
0
            public static string Resp(List <string> args)
            {
                DateTime d = DateTime.Now;

                CID.Send(new string[] { "", "", client_id.ToString(), "&5Resp&6#&5Resp" }.ToList());
                CID.DownloadAll();
                for (int i = 0; i < unread.Count; i++)
                {
                    if (unread[i].Contains("&5Resp&6#&5Resp"))
                    {
                        DateTime d1   = DateTime.Now;
                        TimeSpan diff = d1 - d;
                        Program.WriteTxt("&aResponse : ");
                        Program.WriteTxt("  &aSent    : &5" + d.ToString("HH:mm:ss:ff"));
                        Program.WriteTxt("  &aRecived : &5" + d1.ToString("HH:mm:ss:ff"));
                        Program.WriteTxt("  &aOffset  : &5" + Math.Round(diff.TotalMilliseconds, 0) + "ms");
                        unread.Remove(unread[i]);
                        return("");
                    }
                    else
                    {
                        Program.WriteTxt("&4Message not recived");
                    }
                }

                return("");
            }
Пример #2
0
 private ListViewItem FindListViewItem(CID id)
 {
     foreach(ListViewItem li in _keyConfigList.Items) {
         if(li.Tag.Equals(id)) return li;
     }
     return null;
 }
Пример #3
0
        public void Load(ConfigNode parent)
        {
            InitCommands();
            InitFixedCommands();

            ConfigNode node = parent.FindChildConfigNode("key-definition");

            if (node != null)
            {
                IDictionaryEnumerator ie = node.GetPairEnumerator();
                while (ie.MoveNext())
                {
                    CID id = (CID)GUtil.ParseEnum(typeof(CID), (string)ie.Key, CID.NOP);
                    if (id == CID.NOP)
                    {
                        continue;
                    }
                    string value = (string)ie.Value;
                    Entry  e     = FindEntry(id);
                    Keys   t     = GUtil.ParseKey(value.Split(','));
                    e.Modifiers = t & Keys.Modifiers;
                    e.Key       = t & Keys.KeyCode;
                }
            }
        }
Пример #4
0
        public void ModifyKey(CID id, Keys modifiers, Keys key)
        {
            Entry e = FindEntry(id);

            Debug.Assert(e != null);
            ModifyKey(e, modifiers, key);
        }
Пример #5
0
 public string ToURL()
 {
     return(string.Format(
                "https://cdn.fs.neo.org/{0}/{1}",
                CID.ToCID(),
                ObjectID.ToUUID()));
 }
Пример #6
0
 public static void WriteCID(XmlWriter writer, CID cid)
 {
     writer.WriteStartElement("ControlType");
     writer.WriteAttributeString("id", cid.Identifier);
     writer.WriteAttributeString("version", cid.BlockVersion.ToString());
     writer.WriteAttributeString("product", cid.Product);
     writer.WriteEndElement();
 }
Пример #7
0
        public Guid BuildWinForm(FormSchema form)
        {
            Guid winId = innerWeb.AddBlock(CID.New("WinForm"));

            innerWeb[winId].ProcessRequest("InitForm", form);

            return(winId);
        }
Пример #8
0
        public Keys FindKey(CID cid)
        {
            int i = (int)cid;

            Debug.Assert(i >= 0 && i < (int)CID.COUNT);
            Entry e = _IDToEntry[i];

            return(e == null? Keys.None : e.Key | e.Modifiers);
        }
Пример #9
0
 public WelcomeDialog()
 {
     _cid = CID.NOP;
     InitializeComponent();
     InitializeText();
     //
     //
     _checkNext.Checked = GApp.Options.ShowWelcomeDialog;
 }
Пример #10
0
        public void ReadSchema(XmlReader reader)
        {
            ControlType = XMLHelper.ReadCID(reader);

            readBindingsSchema(reader);
            readEventsSchema(reader);
            readPropertiesSchema(reader);
            readControlsSchema(reader);
        }
 public CommandResult Exec(CID id)
 {
     switch(id) {
         case CID.Close:
             return Close();
         case CID.Reproduce:
             return Reproduce();
         case CID.SaveShortcut:
             return SaveShortCut();
         case CID.ShowServerInfo:
             return ShowServerInfo();
         case CID.RenameTab:
             return RenameTab();
         case CID.Paste:
             return Paste();
         case CID.PasteFromFile:
             return PasteFromFile();
         case CID.ClearScreen:
             return ClearScreen();
         case CID.ClearBuffer:
             return ClearBuffer();
         case CID.SelectAll:
             return SelectAll();
         case CID.ToggleNewLine:
             return SetTransmitNewLine(TerminalUtil.NextNewLineOption(_connection.Param.TransmitNL));
         case CID.ToggleLocalEcho:
             return SetLocalEcho(!_connection.Param.LocalEcho);
         case CID.LineFeedRule:
             return ShowLineFeedRuleDialog();
         case CID.ToggleLogSuspension:
             return SetLogSuspended(!_connection.LogSuspended);
         case CID.EditRenderProfile:
             return EditRenderProfile();
         case CID.ChangeLogFile:
             return ChangeLogWithDialog();
         case CID.CommentLog:
             return CommentLog();
         case CID.SendBreak:
             return SendBreak();
         case CID.AreYouThere:
             return AreYouThere();
         case CID.SerialConfig:
             return SerialConfig();
         case CID.ResetTerminal:
             return ResetTerminal();
     #if DEBUG
         case CID.DumpText:
             return DumpText();
     #endif
         case CID.NOP:
             return CommandResult.Ignored;
         default:
             Debug.WriteLine("unknown connection command "+id);
             return CommandResult.Ignored;
     }
 }
Пример #12
0
        public SnapshotIdPool()
        {
            _ids = new CID[MAX_IDS];
            for (var i = 0; i < _ids.Length; i++)
            {
                _ids[i] = new CID();
            }

            Reset();
        }
Пример #13
0
 public WelcomeDialog()
 {
     _cid = CID.NOP;
     InitializeComponent();
     InitializeText();
     //
     // TODO: コンストラクタ ロジックをここに追加してください。
     //
     _checkNext.Checked = GApp.Options.ShowWelcomeDialog;
 }
Пример #14
0
            public override int GetHashCode()
            {
                int hash = 57;

                hash = 27 * hash * MCC.GetHashCode();
                hash = 27 * hash * MNC.GetHashCode();
                hash = 27 * hash * LAC.GetHashCode();
                hash = 27 * hash * CID.GetHashCode();
                return(hash);
            }
Пример #15
0
 public WelcomeDialog()
 {
     _cid = CID.NOP;
     InitializeComponent();
     InitializeText();
     //
     // TODO: �R���X�g���N�^ ���W�b�N������ɒlj����Ă��������B
     //
     _checkNext.Checked = GApp.Options.ShowWelcomeDialog;
 }
 private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
 {
     Util.Atestado        atestado = new Util.Atestado();
     OdontoADMDll.BLL.CID c        = new CID();
     atestado.Periodo = comboPeriodo.SelectedIndex + 1;
     c.CIDID          = int.Parse(comboCID.SelectedValue.ToString());
     //atestado.CodigoCID = c.GetCID().Descricao;
     atestado.CodigoCID = c.GetCID().Codigo;    // Marco (07-12-2011)
     atestado.Dia       = DateTime.Parse(txtDia.Text);
     atestado.FormatarAtestado(oPaciente, e);
 }
Пример #17
0
 public Entry(Category cat, Target target, CID cid, string desc, Keys mod, Keys key)
 {
     _category         = cat;
     _target           = target;
     _cid              = cid;
     _description      = desc;
     _modifiers        = mod;
     _key              = key;
     _defaultModifiers = mod;
     _defaultKey       = key;
 }
Пример #18
0
        public override bool Equals(object obj)
        {
            var conversation = obj as Conversation;

            if (conversation == null)
            {
                return(false);
            }

            return(CID.Equals(conversation.CID));
        }
Пример #19
0
 private ListViewItem FindListViewItem(CID id)
 {
     foreach (ListViewItem li in _keyConfigList.Items)
     {
         if (li.Tag.Equals(id))
         {
             return(li);
         }
     }
     return(null);
 }
Пример #20
0
    public string Next()
    {
        string    ret = "下一篇:没有了", err;
        string    sql = "select top 1 * from smcms_article where CID = " + CID.ToString() + " and ID > " + ID.ToString() + " order by ID ";
        DataTable dt;

        if (ulLinnStudio.ulSqlHelper.GetDatatable(sql, out dt, out err))
        {
            ret = "下一篇:<a href=\"./article.aspx?id=" + dt.Rows[0]["ID"].ToString() + "\">" + dt.Rows[0]["Title"].ToString() + "</a>";
        }
        return(ret);
    }
Пример #21
0
 public Entry FindEntry(CID id)
 {
     if (id >= CID.ExecMacro)
     {
         return(FindMacroEntry(id - CID.ExecMacro));
     }
     else
     {
         int i = (int)id;
         Debug.Assert(i >= 0 && i < (int)CID.COUNT);
         return(_IDToEntry[i]);
     }
 }
        private void carregarBoxes()
        {
            dt   = null;
            oCID = new CID();
            dt   = oCID.ListarCIDs();
            comboCID.ValueMember   = dt.Columns["id"].ToString();
            comboCID.DisplayMember = dt.Columns["descricao"].ToString();
            comboCID.DataSource    = dt;

            comboPeriodo.DataSource = criarListaPeriodo();

            txtDia.Text = DateTime.Now.ToShortDateString();
        }
Пример #23
0
        public static CID ReadCID(XmlReader reader)
        {
            CID result = new CID();

            ProcessTag(reader, "ControlType", null, new TagReaderDelegate(delegate()
            {
                result.Identifier   = reader.GetAttribute("id");
                result.BlockVersion = new BlockVersion(reader.GetAttribute("version"));
                result.Product      = reader.GetAttribute("product");
            }));

            return(result);
        }
Пример #24
0
        // Token: 0x060000F6 RID: 246 RVA: 0x000061B0 File Offset: 0x000043B0
        protected override ADRawEntry LoadADRawEntry()
        {
            ADRawEntry ret = null;
            CID        cid = null;

            if (CID.TryParse(this.Cid, ref cid))
            {
                IRecipientSession recipientSession = DirectoryExtensions.CreateRecipientSession(ADSessionSettings.FromConsumerOrganization(), null);
                IAggregateSession aggregateSession = recipientSession.GetAggregateSession("d:\\dbs\\sh\\e16df\\0212_214120_0\\cmd\\1g\\sources\\Dev\\Cafe\\src\\HttpProxy\\AnchorMailbox\\CidAnchorMailbox.cs", 73, "LoadADRawEntry");
                aggregateSession.MbxReadMode = 0;
                ret = DirectoryHelper.InvokeAccountForest <ADRawEntry>(base.RequestContext.LatencyTracker, () => aggregateSession.FindADRawEntryByCid(cid, this.PropertySet), base.RequestContext.Logger, recipientSession);
            }
            return(base.CheckForNullAndThrowIfApplicable <ADRawEntry>(ret));
        }
Пример #25
0
 private void OnOK(object sender, EventArgs args)
 {
     if (_optNewConnection.Checked)
     {
         _cid = CID.NewConnection;
     }
     else if (_optCygwin.Checked)
     {
         _cid = CID.NewCygwinConnection;
     }
     else if (_optConvert.Checked)
     {
         StartConvert();
     }
 }
Пример #26
0
        private void ImportKeySettings(Hashtable values)
        {
            IDictionaryEnumerator ie = values.GetEnumerator();

            while (ie.MoveNext())
            {
                string name = (string)ie.Key;
                CID    cid  = (CID)GUtil.ParseEnum(typeof(CID), name, CID.NOP);
                if (cid != CID.NOP)
                {
                    Keys k = GUtil.ParseKey(((string)ie.Value).Split(','));
                    GApp.Options.Commands.ModifyKey(cid, k & Keys.Modifiers, k & Keys.KeyCode);
                }
            }
        }
Пример #27
0
 public bool Check15()
 {
     string[] verifyID = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "x" };
     CID = CID.Substring(0, 6) + "19" + CID.Substring(6, 9);
     foreach (string vid in verifyID)
     {
         bool result = Check18(CID + vid);
         if (result)
         {
             ErrMsg += " your Card ID:" + CID + vid;
             return(true);
         }
     }
     return(false);
 }
 private static int ToActionOnLaunchIndex(CID action)
 {
     if (action == CID.NOP)
     {
         return(0);
     }
     else if (action == CID.NewConnection)
     {
         return(1);
     }
     else             //CID.ExecMacro
     {
         return(2 + (int)(action - CID.ExecMacro));
     }
 }
Пример #29
0
        private void OnKeyMapItemActivated(object sender, EventArgs args)
        {
            if (_keyConfigList.SelectedItems.Count == 0)
            {
                return;
            }

            CID id = (CID)_keyConfigList.SelectedItems[0].Tag;

            Commands.Entry e = _commands.FindEntry(id);
            Debug.Assert(e != null);
            _hotKey.Key = e.Modifiers | e.Key;

            _commandName.Text          = String.Format("{0} - {1}", EnumDescAttribute.For(typeof(Commands.Category)).GetDescription(e.Category), e.Description);
            _currentCommand.Text       = e.KeyDisplayString;
            _allocateKeyButton.Enabled = true;
        }
        public ProductDetailViewModel(StockItem stockItem)
        {
            ItemName             = stockItem.StockItemName;
            UnitPrice            = stockItem.UnitPrice;
            TypicalWeightPerUnit = stockItem.TypicalWeightPerUnit;
            LeadTimeDays         = stockItem.LeadTimeDays;
            ValidFrom            = stockItem.ValidFrom;
            CustomFields         = stockItem.CustomFields.Split('"')[3];;
            Tags        = stockItem.Tags;
            Size        = stockItem.Size;
            Company     = stockItem.Supplier.SupplierName;
            Phone       = stockItem.Supplier.PhoneNumber;
            Fax         = stockItem.Supplier.FaxNumber;
            Website     = stockItem.Supplier.WebsiteURL;
            Orders      = stockItem.OrderLines.Where(i => i.StockItemID == stockItem.StockItemID).Count();
            GrossSales  = stockItem.InvoiceLines.Where(i => i.StockItemID == stockItem.StockItemID).Sum(i => i.ExtendedPrice);
            GrossProfit = stockItem.InvoiceLines.Where(i => i.StockItemID == stockItem.StockItemID).Sum(i => i.LineProfit);

            // To get top 10
            var topPurchasers = (from il in stockItem.InvoiceLines
                                 group new
            {
                Quantity = il.Quantity
            }
                                 by new
            {
                CustID = il.Invoice.Customer.CustomerID,
                CustName = il.Invoice.Customer.CustomerName,
            }
                                 into CID
                                 select new
            {
                CNAme = CID.Key.CustName,
                Q = CID.Sum(x => x.Quantity)
            }).OrderByDescending(o => o.Q).Take(10).ToList();

            IEnumerable <int>    intresult = topPurchasers.Select(i => i.Q);
            IEnumerable <string> result    = topPurchasers.Select(i => i.CNAme);
            List <int>           qauntity  = intresult.ToList();
            List <string>        names     = result.ToList();

            TopPurchaserInt = qauntity;
            TopPurchasers   = names;
        }
Пример #31
0
        public override bool Equals(object paramObject)
        {
            if (!(paramObject is LicenseRowItem))
            {
                return(false);
            }
            if (paramObject == this)
            {
                return(true);
            }
            LicenseRowItem licenseRowItem = (LicenseRowItem)paramObject;
            bool           @bool          = false;

            if (CheckedIn == licenseRowItem.CheckedIn && CID.Equals(licenseRowItem.CID, StringComparison.OrdinalIgnoreCase) && Userid.Equals(licenseRowItem.Userid, StringComparison.OrdinalIgnoreCase) && CheckedInDate.Equals(licenseRowItem.CheckedInDate) && ExpDate.Equals(licenseRowItem.ExpDate))
            {
                @bool = true;
            }
            return(@bool && hasSamePlugins(licenseRowItem));
        }
Пример #32
0
        public void EuComoAtendenteQueroInicarUmAgendamento()
        {
            //Arrange
            Agendamento agendamento = new Agendamento();
            Medico      medico      = new Medico("12345", "Fabio");
            Paciente    paciente    = new Paciente("2345", "Joao");
            CID         cid         = new CID("21-9", "Virose");



            //Act
            agendamento.InformarMedico(medico);
            agendamento.InformarCID(cid);
            agendamento.InformarPaciente(paciente);


            //Assert
            Assert.IsTrue(agendamento.Medico.Crm == "12345");
            Assert.IsTrue(agendamento.Paciente.Cpf == "2345");
            Assert.IsTrue(agendamento.Cid.Numero == "21-9");
        }
Пример #33
0
        private void OnAllocateKey(object sender, EventArgs args)
        {
            if (_keyConfigList.SelectedItems.Count == 0)
            {
                return;
            }

            CID  id   = (CID)_keyConfigList.SelectedItems[0].Tag;
            Keys key  = _hotKey.Key;
            int  code = GUtil.KeyToControlCode(key);

            if (code != -1)
            {
                if (GUtil.AskUserYesNo(this, String.Format(GApp.Strings.GetString("Message.OptionDialog.AskOverwriteToASCIIInput"), _hotKey.Text, code)) == DialogResult.No)
                {
                    return;
                }
            }

            Commands.Entry existing = _commands.FindEntry(key);
            if (existing != null && existing.CID != id)
            {
                if (GUtil.AskUserYesNo(this, String.Format(GApp.Strings.GetString("Message.OptionDialog.AskOverwriteCommand"), existing.Description)) == DialogResult.No)
                {
                    return;
                }

                existing.Key       = Keys.None;
                existing.Modifiers = Keys.None;
                FindListViewItem(existing.CID).SubItems[2].Text = "";
            }

            //設定を書き換え
            Commands.Entry e = _commands.FindEntry(id);
            Debug.Assert(e != null);
            _commands.ModifyKey(e.CID, key & Keys.Modifiers, key & Keys.KeyCode);
            _keyConfigList.SelectedItems[0].SubItems[2].Text = e.KeyDisplayString;
        }
Пример #34
0
 public void ModifyKey(CID id, Keys modifiers, Keys key)
 {
     Entry e = FindEntry(id);
     Debug.Assert(e!=null);
     ModifyKey(e, modifiers, key);
 }
Пример #35
0
 public Keys FindKey(CID cid)
 {
     int i = (int)cid;
     Debug.Assert(i>=0 && i<(int)CID.COUNT);
     Entry e = _IDToEntry[i];
     return e==null? Keys.None : e.Key | e.Modifiers;
 }
Пример #36
0
 public Entry FindEntry(CID id)
 {
     if(id >= CID.ExecMacro)
         return FindMacroEntry(id - CID.ExecMacro);
     else {
         int i = (int)id;
         Debug.Assert(i>=0 && i<(int)CID.COUNT);
         return _IDToEntry[i];
     }
 }
Пример #37
0
 private void OnOK(object sender, EventArgs args)
 {
     if(_optNewConnection.Checked)
         _cid = CID.NewConnection;
     else if(_optCygwin.Checked)
         _cid = CID.NewCygwinConnection;
     else if(_optConvert.Checked)
         StartConvert();
 }
Пример #38
0
 protected void AddKeyMap(Category cat, Target target, CID id, string desc, Keys mod, Keys key, int param)
 {
     Entry e = new Entry(cat, target, id, desc, mod, key);
     AddEntry(e);
 }
 public void DelayedExec(CID id)
 {
     _delayed_command_id = id;
     Win32.PostMessage(GApp.Frame.Handle, GConst.WMG_DELAYED_COMMAND, IntPtr.Zero, IntPtr.Zero);
 }
 public void DelayedOpenShortcut(string fn)
 {
     _delayed_command_id = CID.OpenShortcut;
     _delayed_string_data = fn;
     Win32.PostMessage(GApp.Frame.Handle, GConst.WMG_DELAYED_COMMAND, IntPtr.Zero, IntPtr.Zero);
 }
 public CommandResult Exec(CID id)
 {
     switch(id) {
         #region Poderosa stuff
         case CID.PrevPane:
             return MoveToPrevPane();
         case CID.NextPane:
             return MoveToNextPane();
         case CID.MoveTabToPrev:
             return MoveTabToPrev();
         case CID.MoveTabToNext:
             return MoveTabToNext();
         case CID.MovePaneUp:
             return MoveActivePane(Keys.Up);
         case CID.MovePaneDown:
             return MoveActivePane(Keys.Down);
         case CID.MovePaneLeft:
             return MoveActivePane(Keys.Left);
         case CID.MovePaneRight:
             return MoveActivePane(Keys.Right);
         case CID.FrameStyleSingle:
             return SetFrameStyle(GFrameStyle.Single);
         case CID.FrameStyleDivHorizontal:
             return SetFrameStyle(GFrameStyle.DivHorizontal);
         case CID.FrameStyleDivVertical:
             return SetFrameStyle(GFrameStyle.DivVertical);
         case CID.FrameStyleDivHorizontal3:
             return SetFrameStyle(GFrameStyle.DivHorizontal3);
         case CID.FrameStyleDivVertical3:
             return SetFrameStyle(GFrameStyle.DivVertical3);
         case CID.NewConnection:
             return NewConnectionWithDialog(null);
         case CID.NewSerialConnection:
             return NewSerialConnectionWithDialog(null);
         case CID.NewCygwinConnection:
             return NewCygwinConnectionWithDialog(null);
         case CID.NewSFUConnection:
             return NewSFUConnectionWithDialog(null);
         case CID.OpenShortcut:
             return OpenShortCutWithDialog();
         case CID.Copy:
             return Copy();
         case CID.CopyAsLook:
             return CopyAsLook();
         case CID.CopyToFile:
             return CopyToFile();
         case CID.ToggleFreeSelectionMode:
             return ToggleFreeSelectionMode();
         case CID.ToggleAutoSelectionMode:
             return ToggleAutoSelectionMode();
         case CID.OptionDialog:
             return ShowOptionDialog();
         case CID.KeyGen:
             return ShowKeyGenWizard();
         case CID.ChangePassphrase:
             return ShowChangePassphraseDialog();
         case CID.Portforwarding:
             return LaunchPortforwarding();
         case CID.MacroConfig:
             return ShowMacroConfigDialog();
         case CID.StopMacro:
             return StopMacro();
         case CID.ReceiveFile:
             return ShowReceiveFileDialog();
         case CID.SendFile:
             return ShowSendFileDialog();
         case CID.AboutBox:
             return ShowAboutBox();
         case CID.ShowWelcomeDialog:
             return ShowWelcomeDialog();
         case CID.CloseAll:
             return CloseAll();
         case CID.CloseAllDisconnected:
             return CloseAllDisconnected();
         case CID.ExpandPane:
             return ExpandPane(true);
         case CID.ShrinkPane:
             return ExpandPane(false);
         case CID.Quit:
             return QuitApp();
     #if DEBUG
         case CID.EmulateLog:
             return EmulateUsingLog();
     #endif
         case CID.ProductWeb:
             return ShowProductWeb();
         case CID.NOP:
             return CommandResult.Ignored;
         default:
             int n = id - CID.ExecMacro;
             if(n>=0 && n<100)
                 return ExecMacro(n);
             else {
                 Debug.WriteLine("unknown connection command "+id);
                 return CommandResult.Ignored;
             }
         #endregion
     }
 }
Пример #42
0
 public Entry(Category cat, Target target, CID cid, string desc, Keys mod, Keys key)
 {
     _category = cat;
     _target = target;
     _cid = cid;
     _description = desc;
     _modifiers = mod;
     _key = key;
     _defaultModifiers = mod;
     _defaultKey = key;
 }
Пример #43
0
 private static int ToActionOnLaunchIndex(CID action)
 {
     if(action==CID.NOP)
         return 0;
     else if(action==CID.NewConnection)
         return 1;
     else //CID.ExecMacro
         return 2 + (int)(action - CID.ExecMacro);
 }