Beispiel #1
0
 public void Update(JORServer jorServer)
 {
     if (this.ShouldRequestGenObjectInfo())
     {
         jorServer.SendGenObjectInfo(this);
     }
 }
Beispiel #2
0
        public void Click(JORServer server)
        {
            var stream = BeginSendPropertyEvent(server);

            stream.Write(0);
            server.SendEvent(stream);
        }
Beispiel #3
0
        private void SendPropertyEvent(JORServer server)
        {
            var stream = BeginSendPropertyEvent(server);

            stream.Write(4);
            stream.Write(SelectedIndex);
            server.SendEvent(stream);
        }
Beispiel #4
0
        private void SendPropertyEvent(JORServer server)
        {
            var stream = BeginSendPropertyEvent(server);

            stream.Write(4);
            stream.Write(Value);
            server.SendEvent(stream);
        }
Beispiel #5
0
 public JORPanel(JORServer server, JORNode node, StringDictionary transDict)
 {
     this.AutoScroll = true;
     this.Server     = server;
     this.Node       = node;
     this.transDict  = transDict;
     BuildPanel(Node);
 }
Beispiel #6
0
        private void SendPropertyEvent(JORServer server)
        {
            var stream = BeginSendPropertyEvent(server);

            stream.Write(4);
            stream.Write((ushort)(Value ? 0x01 : 0x00));
            stream.Write((ushort)Mask);
            server.SendEvent(stream);
        }
Beispiel #7
0
        public void SetValue(JORServer server, string newValue)
        {
            if (newValue == Text)
            {
                return;
            }

            Text = newValue;
            SendPropertyEvent(server);
        }
Beispiel #8
0
        private void SendPropertyEvent(JORServer server)
        {
            var stream = BeginSendPropertyEvent(server);
            var sjis   = Encoding.GetEncoding(932);
            var bytes  = sjis.GetBytes(Text);

            stream.Write(bytes.Length);
            stream.Write(bytes);
            server.SendEvent(stream);
        }
Beispiel #9
0
        public void SetSelectedIndex(JORServer server, uint newSelectedIndex)
        {
            if (newSelectedIndex == SelectedIndex)
            {
                return;
            }

            SelectedIndex = newSelectedIndex;
            SendPropertyEvent(server);
        }
Beispiel #10
0
        public void SetValue(JORServer server, float newValue)
        {
            if (newValue == Value)
            {
                return;
            }

            Value = newValue;
            SendPropertyEvent(server);
        }
Beispiel #11
0
        private void SetCurrentValue(JORServer server, uint newCurrentValue)
        {
            if (newCurrentValue == CurrentValue)
            {
                return;
            }

            CurrentValue = newCurrentValue;
            SendPropertyEvent(server);
        }
Beispiel #12
0
        private void SetCurrentClient(HIO2ServerClient client)
        {
            if (client == currentClient)
            {
                return;
            }

            currentClient = client;
            jhiClient     = currentClient != null ? new JHIClient(currentClient) : null;
            jorServer     = currentClient != null ? new JORServer(jhiClient) : null;
        }
Beispiel #13
0
        protected MemoryOutputStream BeginSendPropertyEvent(JORServer server)
        {
            MemoryOutputStream stream = server.BeginSendEvent(JOREventType.PropertyEvent);

            stream.Write(Node.NodePtr);
            stream.Write(0); // Unknown, game skips over it
            stream.WriteMagic(Type);
            stream.Write((uint)Kind);
            stream.Write(ID);
            stream.Write(ListenerPtr);
            return(stream);
        }
Beispiel #14
0
        private void SetCurrentClient(HIO2ServerClient client)
        {
            if (client == currentClient)
            {
                return;
            }

            currentClient = client;
            jhiClient     = currentClient != null ? new JHIClient(currentClient) : null;
            jorServer     = currentClient != null ? new JORServer(jhiClient) : null;
            if (jorServer != null)
            {
                jorServer.NodeUpdated += NodeUpdated;
            }
            hexBox1.ByteProvider = currentClient != null ? new DynamicFileByteProvider(currentClient.file.CreateViewStream()) : null;
            SyncPanelControls(null);
        }
Beispiel #15
0
 public void SetSelectedIndex(JORServer server, uint newSelectedIndex)
 {
     SetCurrentValue(server, Items[(int)newSelectedIndex].Value);
 }