public UceniciEditWindow(Ucenik u, MOD m = MOD.DODAVANJE) : this()
 {
     this.original    = u;
     this.mod         = m;
     this.editObject  = original.DeepCopy();
     this.DataContext = editObject;
 }
Beispiel #2
0
        public static void Postfix(InnerPlayerControl __instance, InnerPlayerControl DGDGDKCCKHJ)
        {
            var pos = MOD.GetSystem(DGDGDKCCKHJ.GetTruePosition());

            Stats.Murder(__instance, DGDGDKCCKHJ, pos);
            Process.SetDeath(DGDGDKCCKHJ);
        }
        public void RegisterHotKeys()
        {
            if (!enabled)
            {
                return;
            }

            for (int id = 0; id < keyState.Length; id++)
            {
                if (keys[id] != Keys.None)
                {
                    MOD fsModifiers = ((keys[id] & Keys.Alt) == Keys.Alt) ? MOD.ALT : 0;

                    if ((keys[id] & Keys.Control) == Keys.Control)
                    {
                        fsModifiers |= MOD.CONTROL;
                    }

                    if ((keys[id] & Keys.Shift) == Keys.Shift)
                    {
                        fsModifiers |= MOD.SHIFT;
                    }

                    keyState[id] = NativeMethods.RegisterHotKey(windowHandle, id, fsModifiers, (int)(keys[id] & Keys.KeyCode));
                }
            }
        }
        public KurseviEditWindow(Kurs k, MOD m = MOD.DODAVANJE) : this()
        {
            this.original    = k;
            this.mod         = m;
            this.copyObj     = original.Clone() as Kurs;
            this.DataContext = copyObj;

            cvs                     = new CollectionViewSource();
            cvs.Source              = original.Ucenici;
            dgUcenici.ItemsSource   = cvs.View;
            dgUcenici.IsReadOnly    = true;
            dgUcenici.SelectionMode = DataGridSelectionMode.Single;

            dgUcenici.AutoGenerateColumns = false;
            DataGridTextColumn c = new DataGridTextColumn();

            c.Header  = "Ime";
            c.Binding = new Binding("Ime");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgUcenici.Columns.Add(c);

            c         = new DataGridTextColumn();
            c.Header  = "Prezime";
            c.Binding = new Binding("Prezime");
            c.Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            dgUcenici.Columns.Add(c);
        }
 public NastavniciEditWindow(Nastavnik n, MOD m = MOD.DODAVANJE) : this()
 {
     this.original    = n;
     this.mod         = m;
     this.editObject  = original.DeepCopy();
     this.DataContext = editObject;
 }
Beispiel #6
0
 public KorisniciEditWindow(Korisnik k, MOD m = MOD.DODAVANJE) : this()
 {
     this.original    = k;
     this.mod         = m;
     this.editObject  = original.DeepCopy();
     this.DataContext = editObject;
 }
Beispiel #7
0
        private void ShutdownToolStripMenuItem_Click(object sender, EventArgs e)
        {
            executeMod = MOD.shutdown;

            pbarForm = new ProgressBarForm(this, executeMod);
            pbarForm.Show();
        }
Beispiel #8
0
 public TipoviKursaEditWindow(TipKursa t, MOD m = MOD.DODAVANJE) : this()
 {
     this.original    = t;
     this.mod         = m;
     this.copyObj     = original.Clone() as TipKursa;
     this.DataContext = copyObj;
 }
Beispiel #9
0
 public NivoiIzmena(TipKursa j, MOD m = MOD.DODAVANJE) : this()
 {
     this.original    = j;
     this.copyObj     = (TipKursa)original.Clone();
     this.mod         = m;
     this.DataContext = copyObj;
 }
Beispiel #10
0
        private void HibernateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            executeMod = MOD.hibernate;

            pbarForm = new ProgressBarForm(this, executeMod);
            pbarForm.Show();
        }
Beispiel #11
0
 public JeziciEditWindow(Jezik j, MOD m = MOD.DODAVANJE) : this()
 {
     this.original    = j;
     this.mod         = m;
     this.copyObj     = original.Clone() as Jezik;
     this.DataContext = copyObj;
 }
 public JezikIzmena(Jezik j, MOD m = MOD.DODAVANJE) : this()
 {
     this.original    = j;
     this.copyObj     = (Jezik)original.Clone();
     this.mod         = m;
     this.DataContext = copyObj;
 }
Beispiel #13
0
 public GlobalHotkey(MOD modifier, Keys key, Form form)
 {
     this.modifier = (int)modifier;
     this.key      = (int)key;
     hWnd          = form.Handle;
     id            = GetHashCode();
 }
Beispiel #14
0
        private void Register()
        {
            if (hWnd == null)
            {
                hWnd = new HotkeyForm();
                hWnd.CreateHandle(new CreateParams());
            }

            if (!this.Enabled)
            {
                MOD modifiers = 0;

                if ((this.Keys & Keys.Alt) == Keys.Alt)
                {
                    modifiers = modifiers | MOD.MOD_ALT;
                }
                if ((this.Keys & Keys.Control) == Keys.Control)
                {
                    modifiers = modifiers | MOD.MOD_CONTROL;
                }
                if ((this.Keys & Keys.Shift) == Keys.Shift)
                {
                    modifiers = modifiers | MOD.MOD_SHIFT;
                }
                Keys k = this.Keys & ~Keys.Control & ~Keys.Shift & ~Keys.Alt;

                this.ID = (new Random()).Next(0x1000, 0xbfff);

                NativeMethod.RegisterHotKey(hWnd.Handle, this.ID, modifiers, k).CheckError();
                this.Enabled = true;

                hWnd.Handler += this.hWndHotkeyEvent;
            }
        }
Beispiel #15
0
 public static void OnStart(TextMeshPro __instance)
 {
     if (__instance != null && OnStartDict.TryGetValue(__instance.m_CachedPtr, out var action))
     {
         OnStartDict.Remove(__instance.m_CachedPtr);
         MOD.RunLater(() => action?.Invoke(__instance));
     }
 }
 private static void SendAsync(object sender, EventArgs e)
 {
     MOD.log.LogMessage(MOD.Serialize(e));
     if (Instance == null || !Instance.socket.Connected)
     {
         return;
     }
     Instance.socket.EmitAsync(e.getName(), MOD.Serialize(e));
 }
Beispiel #17
0
 private static void Print()
 {
     MOD.log.LogMessage(MOD.Serialize(new EndPlayerStatsEventArgs()
     {
         Meetings       = Meeting.Meetings,
         Murders        = Models.Murder.Murders,
         EndPlayerStats = PlayerStats.Stats.Values.ToList(),
     }));
 }
Beispiel #18
0
        public static void Prefix(MessageReader FMNNFELNLID)
        {
            var read = MOD.Read(FMNNFELNLID);

            if (read.Length != 14 || read[0] != 11)
            {
                //MOD.log.LogMessage("RPC InnerNetClient: " + string.Join(",", read));
            }
        }
Beispiel #19
0
        //standby force
        private void BtnSuspend_Click(object sender, EventArgs e)
        {
            tStripLbl.Text = "절전모드";

            SetToolStripEnabled();

            executeMod = MOD.suspend;

            SetTimerForDelayedExecution();
        }
Beispiel #20
0
        // 최대 절전모드
        private void BtnHibernate_Click(object sender, EventArgs e)
        {
            tStripLbl.Text = "최대절전모드";

            SetToolStripEnabled();

            executeMod = MOD.hibernate;

            SetTimerForDelayedExecution();
        }
Beispiel #21
0
        // computer turn off
        private void BtnShutDown_Click(object sender, EventArgs e)
        {
            tStripLbl.Text = "컴퓨터 종료";

            SetToolStripEnabled();

            executeMod = MOD.shutdown;

            SetTimerForDelayedExecution();
        }
Beispiel #22
0
        public KurseviEditWindow(Kurs n, MOD m = MOD.DODAVANJE) : this()
        {
            this.original    = n;
            this.mod         = m;
            this.editObject  = original.DeepCopy();
            this.DataContext = editObject;

            //SelectedItem = "{Binding ElementName=dgKursevi, Path=SelectedItem.Nastavnik}"
            comboBoxNastavnik.ItemsSource = Aplikacija.Instanca.Nastavnici;
        }
Beispiel #23
0
 public KorisnikIzmena(Korisnik k, MOD m = MOD.DODAVANJE) : this()
 {
     if (m == MOD.IZMENA)
     {
         tbJMBG.IsEnabled = false;
     }
     this.original    = k;
     this.copyObj     = (Korisnik)original.Clone();
     this.mod         = m;
     this.DataContext = copyObj;
 }
        //============= 3、实现注册热键的方法 ====================

        /// <summary>
        /// 注册热键
        /// </summary>
        /// <param name="hWnd">窗口句柄</param>
        /// <param name="nID">热键标识</param>
        /// <param name="modKey">组合键</param>
        /// <param name="nVK">热键</param>
        /// <returns></returns>
        public static bool RegHotKey(IntPtr hWnd, int nID, MOD modKey, int nVK)
        {
            //========== 3.1、先释放该窗口句柄下具有相同标识的热键 =============
            UnregisterHotKey(hWnd, nID);

            //========== 3.2、注册热键 =========================================
            int nResult = RegisterHotKey(hWnd, nID, (int)modKey, nVK);

            //========== 3.3、返回注册结果 =====================================
            return(nResult != 0 ? true : false);
        }
Beispiel #25
0
 public HotKeyForm(MOD modKey, Keys key, ThreadStart proc)
 {
     this.proc = proc;
     for (int i = 0x0000; i <= 0xbfff; i++)
     {
         if (RegisterHotKey(this.Handle, i, modKey, key) != 0)
         {
             id = i;
             break;
         }
     }
 }
Beispiel #26
0
 public override void OnWsConnecting(HttpRequest request)
 {
     request.SetBegin("GET", "/");
     request.SetHeader("Host", "localhost");
     request.SetHeader("Origin", "http://localhost");
     request.SetHeader("Upgrade", "websocket");
     request.SetHeader("Connection", "Upgrade");
     request.SetHeader("Sec-WebSocket-Key", Convert.ToBase64String(WsNonce));
     request.SetHeader("Sec-WebSocket-Protocol", "among, voip");
     request.SetHeader("Sec-WebSocket-Version", "13");
     request.SetHeader("Room", MOD.Serialize(ConnectEventArgs));
 }
        public NastavniciEditWindow(Nastavnik n, MOD m = MOD.DODAVANJE)
            : this()
        {
            this.original    = n;
            this.mod         = m;
            this.copyObj     = original.Clone() as Nastavnik;
            this.DataContext = copyObj;

            if (mod == MOD.IZMENA)
            {
                tbJmbg.IsEnabled = false;
            }
        }
Beispiel #28
0
        public UceniciEditWindow(Ucenik u, MOD m = MOD.DODAVANJE)
        {
            InitializeComponent();
            this.original    = u;
            this.mod         = m;
            this.copyObj     = original.Clone() as Ucenik;
            this.DataContext = copyObj;

            if (mod == MOD.IZMENA)
            {
                tbJmbg.IsEnabled = false;
            }
        }
Beispiel #29
0
        public static void Prefix(byte ONIABIILFGF, MessageReader JIGFBHFFNFI)
        {
            var rpc = (RPC)ONIABIILFGF;

            switch (rpc)
            {
            case RPC.SetInfected:
                new SetInfected(MOD.Read(JIGFBHFFNFI)).infecteds.ForEach(control =>
                                                                         MOD.log.LogMessage(control.nameText.text + " is Impostor"));
                break;

            default:
                //MOD.log.LogMessage(rpc.ToString());
                break;
            }
        }
Beispiel #30
0
        public KorisniciEditWindow(Korisnik k, MOD m = MOD.DODAVANJE) : this()
        {
            this.original     = k;
            this.mod          = m;
            this.copyObj      = original.Clone() as Korisnik;
            this.DataContext  = copyObj;
            cbTip.ItemsSource = Aplikacija.Instanca.TipoviKorisnika;

            if (mod == MOD.IZMENA)
            {
                tbJmbg.IsEnabled = false;
            }
            else
            {
                //cbTip.SelectedItem =
            }
        }
 public static extern bool RegisterHotKey(IntPtr hWnd, int id, MOD fsModifiers, uint vk);