Beispiel #1
0
    public static void SetBackground()
    {
        string str = "http://bing.com";

        //string str = "D:\\Wallpaper\\Slideshow\\wallpaper.jpg";
        RemoteMessage.Send(Msg.SetBackground, str);
    }
Beispiel #2
0
    public static void SetBackground()
    {
        string str = "http://bing.com";

        //string str = "D:\\Wallpaper\\Slideshow\\yande.re 424111 landscape niko_p signed wallpaper.jpg";
        RemoteMessage.Send(Msg.SetBackground, str);
    }
Beispiel #3
0
    public static void SetModel()
    {
        ModelEntity entity = new ModelEntity();

        entity.id   = 1;
        entity.file = "E:\\Projects\\Live2D\\Resources\\Live2DResource\\Models\\Sample2\\wanko\\wanko.model.json";
        RemoteMessage.Send(Msg.SetModel, entity);
    }
Beispiel #4
0
    public static void SetExpression()
    {
        ModelEntity entity = new ModelEntity();

        entity.id    = 0;
        entity.expId = 1;

        RemoteMessage.Send(Msg.SetExpression, entity);
    }
Beispiel #5
0
    public static void SetPosition()
    {
        ModelEntity entity = new ModelEntity();

        entity.id   = 0;
        entity.posX = 200;
        entity.posY = 200;

        RemoteMessage.Send(Msg.SetPosition, entity);
    }
Beispiel #6
0
    public static void StartMotion(int type, string mtn)
    {
        ModelEntity entity = new ModelEntity();

        entity.id   = 0;
        entity.type = type;
        entity.mtn  = mtn;

        RemoteMessage.Send(Msg.StartMotion, entity);
    }
Beispiel #7
0
    public static void ShowTextBubble()
    {
        TextBubbleEntity entity = new TextBubbleEntity();

        entity.id      = 0;
        entity.text    = "Test";
        entity.choices = new string[] { "Choice 1", "Choice 2" };

        RemoteMessage.Send(Msg.ShowTextBubble, 1, entity);
    }
Beispiel #8
0
    public static void SetBackground()
    {
        var entity = new BGEntity()
        {
            id   = 1,
            file = "http://bing.com"
        };

        //string str = "D:\\Wallpaper\\Slideshow\\wallpaper.jpg";
        RemoteMessage.Send(Msg.SetBackgroundV2, 3, entity);
    }
Beispiel #9
0
 public static void RegisterModelEventListener()
 {
     RemoteMessage.Send(Msg.RegisterModelEventListener);
 }
Beispiel #10
0
 public static void ClearExpression()
 {
     RemoteMessage.Send(Msg.ClearExpression, 0);
 }
Beispiel #11
0
 public static void NextExpression()
 {
     RemoteMessage.Send(Msg.NextExpression, 0);
 }
Beispiel #12
0
 public static void UnregisterModelEventListener()
 {
     RemoteMessage.Send(Msg.UnregisterModelEventListener, 0);
 }
Beispiel #13
0
 public static void RemoveEffect()
 {
     Console.WriteLine("RemoveEffect: " + 100100);
     RemoteMessage.Send(Msg.RemoveEffect, 100100);
 }
Beispiel #14
0
 public static void AddEffect()
 {
     RemoteMessage.Send(Msg.AddEffect, 100100);
 }
Beispiel #15
0
 public static void RemoveModel()
 {
     RemoteMessage.Send(Msg.RemoveModel, 1);
 }
Beispiel #16
0
 public static void RemoveEffect()
 {
     RemoteMessage.Send(Msg.RemoveEffect, 100100);
 }
Beispiel #17
0
        public static void SyncToLive2DViewerEX(Computer computer)
        {
            if (!ExClient.Instance.IsOpen)
            {
                return;
            }

            ComputerEntity entity = new ComputerEntity();

            List <ComputerEntity.Hardware> list       = new List <ComputerEntity.Hardware>();
            List <ComputerEntity.Sensor>   sensorList = new List <ComputerEntity.Sensor>();

            for (int i = 0; i < computer.Hardware.Length; i++)
            {
                sensorList.Clear();
                IHardware hardware = computer.Hardware[i];

                ComputerEntity.Hardware hw = null;
                switch (hardware.HardwareType)
                {
                case HardwareType.CPU:
                    hw = CreateHardware(hardware, ComputerEntity.HardwareType.CPU);
                    ISensor sensor = FindSensor(hardware, SensorType.Load, "CPU Total");
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.Load));
                    }
                    sensor = FindSensor(hardware, SensorType.Temperature, null);
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.Temperature));
                    }
                    hw.sensors = sensorList.ToArray();
                    break;

                case HardwareType.RAM:
                    hw     = CreateHardware(hardware, ComputerEntity.HardwareType.RAM);
                    sensor = FindSensor(hardware, SensorType.Load, "Memory");
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.Load));
                    }
                    hw.sensors = sensorList.ToArray();
                    break;

                case HardwareType.GpuAti:
                case HardwareType.GpuNvidia:
                    hw = CreateHardware(hardware, ComputerEntity.HardwareType.GPU);

                    hw.subType = hardware.HardwareType == HardwareType.GpuAti ? ComputerEntity.GpuType.Ati : ComputerEntity.GpuType.Nivida;
                    sensor     = FindSensor(hardware, SensorType.Load, "GPU Core");
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.Load));
                    }
                    sensor = FindSensor(hardware, SensorType.Temperature, null);
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.Temperature));
                    }
                    hw.sensors = sensorList.ToArray();
                    break;

                case HardwareType.HDD:
                    hw     = CreateHardware(hardware, ComputerEntity.HardwareType.HDD);
                    sensor = FindSensor(hardware, SensorType.Load, null);
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.Load));
                    }
                    hw.sensors = sensorList.ToArray();
                    break;

                case HardwareType.NIC:
                    if (!NicEx.IsAvailable(hardware))
                    {
                        break;
                    }

                    hw = CreateHardware(hardware, ComputerEntity.HardwareType.NIC);
                    NetworkInterfaceType nit = NicEx.GetNetworkInterfaceType(hardware);
                    hw.subType = nit == NetworkInterfaceType.Wireless80211 ? ComputerEntity.NicType.Wireless : ComputerEntity.NicType.Ethernet;

                    sensor = FindSensor(hardware, SensorType.InternetSpeed, "Upload Speed");
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.NetUpSpeed));
                    }
                    sensor = FindSensor(hardware, SensorType.InternetSpeed, "Download Speed");
                    if (sensor != null)
                    {
                        sensorList.Add(CreateSensor(sensor, ComputerEntity.SensorType.NetDownSpeed));
                    }
                    hw.sensors = sensorList.ToArray();
                    break;
                }
                if (hw != null)
                {
                    list.Add(hw);
                }
            }

            entity.hardware = list.ToArray();
            RemoteMessage.Send(Msg.SyncResourceMonitor, entity);
        }